-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Make default dimension name of a histogram be less generic #1776
Comments
I am in favor of this change as an 'x Frequency' dimension is not the same as a 'y Frequency' dimension. |
Sounds like a straightforward change; if you want to make a PR it would force us to do it soon! :-) |
Here is where you'd have to define a value dimension (vdim): https://github.com/ioam/holoviews/blob/master/holoviews/operation/element.py#L555 |
So I can change the name of the vdim and it works as hoped for (axes are not linked), but testing it out, I notice that the axes seem to be linked based on the label of the dimension, not its short name. That is, if I say I'm asking because I'd actually like the axis labels to just say "Frequency," because that's nice and clean, and when I see "x Frequency" and "y Frequency" it just looks awkward. Should I create a different issue for automatic linking based on dimension name rather than label? |
The identity of a dimension is defined by the name and label. This is a deliberate choice as one dimension should not have two longer descriptions of what it is! Although a dimension name is expected to have a unique label, what you should be able to do here is If that doesn't work then I would consider it a bug - linking dimensions should not be done on the label alone. |
Yes, this is what is happening for me-- the two axes are linked when the labels are the same, but the names are not. Any suggestions where I should look for this, so I can include a fix to this on the PR if possible? |
@philippjfr Any suggestions? |
Both the normalization system and bokeh axis linking code long precede the introduction of separate name and label attributes and therefore likely work based on the final axis label. This won't be a straightforward change as it involves changing a fair amount of the plotting code, but I agree it should be done at some point. |
We agree in principle then. Shame it will be a bigger job than I hoped and I think this should be the semantics for version 2.0. I'll assign that milestone to issue #1783. |
Just merged #1836 so this has now been addressed. |
Because a y-axis of a histogram gets the generic name "Frequency", two axes in the same layout end up linked by default, even if that doesn't make sense. It might be better to have the frequency dimension named after the name of the dimension being histogrammed; e.g., "x Frequency" or "x Count".
The text was updated successfully, but these errors were encountered: