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
I have since rectified by problems by coercing the names to all follow the form Tree##, however I never did find out whether plotly supports specified ordering of columns (e.g. an option to tell it to use the ordering of the input matrix specifically).
If this exists and I've not found it, could you point me in the right direction as I've found nothing helpful so far.
If it doesn't, could you consider it as a feature request for future versions, to give more control over axis label ordering?
The text was updated successfully, but these errors were encountered:
This was caused by a (poorly documented) intentional change. Just like in ggplot2, this change was intended to ensure categorical axis ordering either: (1) matches factor level ordering or (2) is sorted alphabetically (in the case of character strings). Thus, you can currently resolve the problem by ensuring the row/column names are factors:
That being said, I consider the current behavior when row/column names are strings to be a bug since the row/column names are reordered, but the z values aren't:
plot_ly() %>%
add_heatmap(z=~m, x=cs, y=rs)
I see two ways to move forward:
(1) Reorder the z attribute appropriately.
(2) Avoid any reordering when a z attribute is provided.
The benefit of (1) is that the behavior would be consistent with other trace types (i.e., "scatter"), but it seems like you rarely would ever actually want that behavior, and doing it correctly in all cases seems hard, so I'm leaning towards (2).
After updating plotly recently, the behaviour of the default heatmap label order seemed to have changed.
See this SO post for the full details: http://stackoverflow.com/questions/41231318/prevent-plot-ly-reordering-matrix
I have since rectified by problems by coercing the names to all follow the form Tree##, however I never did find out whether plotly supports specified ordering of columns (e.g. an option to tell it to use the ordering of the input matrix specifically).
If this exists and I've not found it, could you point me in the right direction as I've found nothing helpful so far.
If it doesn't, could you consider it as a feature request for future versions, to give more control over axis label ordering?
The text was updated successfully, but these errors were encountered: