-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plot becomes jagged with min-max aggregation #4969
Comments
### What * Fixes #4954 * Related to #4969 on hover plot: ![image](https://github.com/rerun-io/rerun/assets/1220815/f1583f64-42a6-4517-af4d-ad2fed1b2b06) on hover settings: ![image](https://github.com/rerun-io/rerun/assets/1220815/0d5d2256-80a4-4a88-b370-5c5afa7a126c) Also, made it default to `MinMaxAverage` since this looks better on all my screens for smooth lines. ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using newly built examples: [app.rerun.io](https://app.rerun.io/pr/4987/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/4987/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/4987/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG - [PR Build Summary](https://build.rerun.io/pr/4987) - [Docs preview](https://rerun.io/preview/141491880209d44706b04425ff8643f7e8dca9ef/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/141491880209d44706b04425ff8643f7e8dca9ef/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
### What * Workaround for #4969 We would previously aggregate the plots over a time-window equal in width to a ui point. The MinMax aggregator does a zig-zag between min and max, so this causes a very jagged look, especially on high-dpi screens. With this PR, we switch to using a physical pixels as the default aggregation width, but for MinMax is is _half_ a pixel. This reduces the jaggedness, but does not completely remove it. It comes at a cost though of higher tessellation cost. I have an idea for how we can throw rayon on the tessellation problem though. ## Before <img width="790" alt="Screenshot 2024-02-01 at 14 18 26" src="https://github.com/rerun-io/rerun/assets/1148717/e12fd92c-819b-4ba6-9ce1-0b7e95a0e151"> ## After <img width="790" alt="Screenshot 2024-02-01 at 14 18 00" src="https://github.com/rerun-io/rerun/assets/1148717/52c0f2e7-25d3-4f8b-b431-b4c91a8e67bf"> ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using newly built examples: [app.rerun.io](https://app.rerun.io/pr/4998/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/4998/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/4998/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG - [PR Build Summary](https://build.rerun.io/pr/4998) - [Docs preview](https://rerun.io/preview/17721aa538a03c890574d14795dce6502f8cc004/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/17721aa538a03c890574d14795dce6502f8cc004/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
EDIT: I've changed my mind again. Looking at how awful the plot aggregator in PostHog is I am now convinced that I rather have jagged, ugly plots, than misleading ones. |
min-max aggregation causes a zig-zag line to be generated, causing jagged look of otherwise smooth lines:
the solution is to instead output a thicker line, but that needs support in egui_plot.
We don't want to switch to another default aggregator though - min-max does great of showing the upper and lower bounds, which can be crucial.
The text was updated successfully, but these errors were encountered: