-
Notifications
You must be signed in to change notification settings - Fork 34
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
Size cleanup #371
Size cleanup #371
Conversation
This PR addresses some issues around the "size" scaling that was not very usable beside the basic usage. Several changes: * Scaling is *area based* (which is the perceptually right thing) * Removed the "reverse" button and switch that was actually meaningless in many cases * Differentiate between linear and flipped-linear mapping (that span the whole min-max range) and "absolute" mappings including proportional, log, sqrt, inverse that instead use an "absolute" scale NB this is another breaking change as it removes the "reverse" option that was frankly useless
This PR addresses some issues around the "size" scaling that was not very usable beside the basic usage. Several changes: * Scaling is *area based* (which is the perceptually right thing) * Removed the "reverse" button and switch that was actually meaningless in many cases * Differentiate between linear and flipped-linear mapping (that span the whole min-max range) and "absolute" mappings including proportional, log, sqrt, inverse that instead use an "absolute" scale NB this is another breaking change as it removes the "reverse" option that was frankly useless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I like this. When there are negative values in the dataset, this will look like there are missing points.
Why/where is the previous code not working?
<option value="linear" title="Linear mapping over the full range of values (large value -> large size)">linear</option> | ||
<option value="flip-linear" title="Linear reverse mapping over the full range of values (large value -> small size)">flipped linear</option> | ||
<option value="proportional" title="Proportional to actual value, breaks for negative values">proportional</option> | ||
<option value="log" title="Log-scale of actual value, breaks for negative values">log</option> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title does not show for me anywhere. Can you see it in the rendered HTML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the title should (and does, for me) show up as a tooltip if you hover the mouse over the option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right! It just take a second for it to appear
For instance, the log would have negative values, that would render as the absolute value so small values give larger points. Also in general, given we don't have a "scale" to refer to, it is really hard (should I say impossible?) to interpret a sqrt(x), log(x) or 1/x scaling if it is referred to a shifted range. |
I guess that's fair, but then I would do like when using a log scale for the x/y/z axis and (a) send a warning to the user instead of doing this silently, and (b) ideally drop/hide the corresponding points |
Fair. Done ^_^ |
Fixes #369. I cleaned up a bit the point-size-scaling machinery in a way that hopefully addresses that problem, and makes it more robust and self-explanatory.