You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Have nticks be respected when tickmode='array' #1812
I think the desired output in this instance is for the user to be able to manually specify tick values and labels, but also apply the "auto" tick generating method.
For example, here I am creating a heatmap with categorical labels and automatic ticks by specifying the x co-ordinates, and tick generation works nicely: https://codepen.io/alanoc/pen/yXPgEp
However, in some cases it is desirable to map categorical scales to numerical scales, in order to present them side-by-side with other plots (and, more importantly, aligned), while maintaining meaningful categorical ticks. For example, heatmaps are commonly presented with dendrograms aligned to rows and columns, in order to show relationships between samples (eg, https://i.stack.imgur.com/1qTWn.png).
To accomplish this, I would commonly specify a numeric axis and tick values, but character tick text. In this case, label overplotting is very common: https://codepen.io/alanoc/pen/WOXRLE
Perhaps tickvals and ticktext are not the right parameters to be used in this instance, as they do imply the values actually used for ticks; however I do think it would be useful to have this level of control.
Reacted by Tal Galili, Manfred Artavia Gómez, Juan Carlos, Darian Bhathena, Fengyun Liu and Sébastien Lavoie
This is a problem we are facing right now. I want to be able to add ellipsis to the labels in the X axis, so we use ticktext and tickvals to set the values on the labels. As you can see in the example above by @alanocallaghan the number of ticks might be a huge amount of data so in those cases, the auto setting is disabled and the labels become unreadable. Perhaps we should be able to handle the number of ticks shown on the graph or let the auto handling for the number of ticks to be available instead of making them mutually exclusive.
As discussed in #1965 (comment) I think this is a different issue, and might be solved by something like #303 which we could generalize for the tickmode = 'array' case like "iterate through the array and display each tick iff it's more than n pixels away from all the others we've already drawn"
Thanks @alexcjohnson for the clarification and for re-opening this.
I'm looking forward for #303 to be resolved, so that you or others could try to leverage it to solve this issue.
Hello @etpinard (and @alexcjohnson),
I see that you wrote in #1946 that it would provide a solution to this issue. I see it is now closed thanks to #1965. Does this mean that this issue is now also resolved? If not, what else should be done in order to address it?
We need to resurrect #303 and incorporate this into it. Unfortunately Plotly folks are extremely busy for the next few months so I don't see this getting addressed in the near future without a community volunteer to spearhead it.
A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.
Sponsorship range: $5k-$10k
What Sponsorship includes:
Completion of this feature to the Sponsor's satisfaction, in a manner coherent with the rest of the Plotly.js library and API
Tests for this feature
Long-term support (continued support of this feature in the latest version of Plotly.js)
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson
Hi @gvwilson
This problem still hinders/impacts heatmaply.
But given that this wasn't addressed in 7 years now, I don't see a point in asking for it again.
Users would just have to live with the reduced performance due to this issue not getting addressed.
Activity
etpinard commentedon Jun 26, 2017
That's the intended behavior. Setting
tickmode: 'array'turns off the auto-ticks (wherenticksis used).When you say
What do you mean? What is the expected behavior in your mind?
alanocallaghan commentedon Jun 27, 2017
I think the desired output in this instance is for the user to be able to manually specify tick values and labels, but also apply the "auto" tick generating method.
For example, here I am creating a heatmap with categorical labels and automatic ticks by specifying the x co-ordinates, and tick generation works nicely:
https://codepen.io/alanoc/pen/yXPgEp
However, in some cases it is desirable to map categorical scales to numerical scales, in order to present them side-by-side with other plots (and, more importantly, aligned), while maintaining meaningful categorical ticks. For example, heatmaps are commonly presented with dendrograms aligned to rows and columns, in order to show relationships between samples (eg, https://i.stack.imgur.com/1qTWn.png).
To accomplish this, I would commonly specify a numeric axis and tick values, but character tick text. In this case, label overplotting is very common:
https://codepen.io/alanoc/pen/WOXRLE
Perhaps
tickvalsandticktextare not the right parameters to be used in this instance, as they do imply the values actually used for ticks; however I do think it would be useful to have this level of control.JuankS92 commentedon Jul 21, 2017
This is a problem we are facing right now. I want to be able to add ellipsis to the labels in the X axis, so we use
ticktextandtickvalsto set the values on the labels. As you can see in the example above by @alanocallaghan the number of ticks might be a huge amount of data so in those cases, the auto setting is disabled and the labels become unreadable. Perhaps we should be able to handle the number of ticks shown on the graph or let the auto handling for the number of ticks to be available instead of making them mutually exclusive.etpinard commentedon Aug 10, 2017
Merging with #1812
alanocallaghan commentedon Aug 11, 2017
@etpinard this issue is #1812
etpinard commentedon Aug 11, 2017
Merged with #1946
alexcjohnson commentedon Oct 10, 2017
As discussed in #1965 (comment) I think this is a different issue, and might be solved by something like #303 which we could generalize for the
tickmode = 'array'case like "iterate through the array and display each tick iff it's more than n pixels away from all the others we've already drawn"alanocallaghan commentedon Oct 11, 2017
I think that's right @alexcjohnson, thanks for the clarification
talgalili commentedon Oct 12, 2017
Thanks @alexcjohnson for the clarification and for re-opening this.
I'm looking forward for #303 to be resolved, so that you or others could try to leverage it to solve this issue.
talgalili commentedon Oct 20, 2017
Hello @etpinard (and @alexcjohnson),
I see that you wrote in #1946 that it would provide a solution to this issue. I see it is now closed thanks to #1965. Does this mean that this issue is now also resolved? If not, what else should be done in order to address it?
Thanks.
alexcjohnson commentedon Oct 20, 2017
@talgalili this is separate from #1946 and #1965, as mentioned in #1812 (comment)
We need to resurrect #303 and incorporate this into it. Unfortunately Plotly folks are extremely busy for the next few months so I don't see this getting addressed in the near future without a community volunteer to spearhead it.
talgalili commentedon Oct 21, 2017
Thanks @alexcjohnson - I've added a comment on #303 and I hope someone could take it upon themselves to add this.
quick fix for plotly#1812: nticks and tickmode=array
jackparmer commentedon Sep 10, 2020
This issue has been tagged with
NEEDS SPON$ORA community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.
Sponsorship range: $5k-$10k
What Sponsorship includes:
Please include the link to this issue when contacting us to discuss.
gvwilson commentedon Jun 10, 2024
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson
talgalili commentedon Jun 15, 2024
Hi @gvwilson
This problem still hinders/impacts heatmaply.
But given that this wasn't addressed in 7 years now, I don't see a point in asking for it again.
Users would just have to live with the reduced performance due to this issue not getting addressed.
Thanks for your other work.
Tal.