-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
allow for horizontal colorbar #1244
Comments
This would be great—it would make things centre on the page in a much more visually appealing way! |
This would be a great benefit to the JWST ETC project. With the colorbar vertical, any variation in the number of sig. figs shown for the colorbar numerical tick values change the width of the whole area. |
@divyachandran-ds brought this issue to my attention. I think that allowing colorbars to have an horizontal orientation would be really useful as well as tight control of their position to not waste (sometimes very precious) space. |
If your organization has a software budget and needs this feature, you can prioritize & sponsor the development of it by reaching out to our team: https://plot.ly/products/consulting-and-oem/. Much of our development is funded this way. Otherwise, we'll update this issue when it's planned for an upcoming release. There are no updates at this moment and it is still a great idea. |
Agree with @antoinerg. This also helps when the corresponding plot changes height based on the data (eg time-series heatmap) and the vertical bar can get cut off. |
@JeroneGagliano for your issue you can set the layout height and yaxis domain according to the size of your data, but I agree a horizontal colorbar would be more convenient. |
+1 |
1 similar comment
+1 |
@Z-me Is that a workaround for the heatmap? If yes, could you share how you managed to get it? |
This issue has been tagged with 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: $10k-$15k What Sponsorship includes:
Please include the link to this issue when contacting us to discuss. |
Maybe I am missing something and I would like to understand where the difficulty resides. Can someone explain to me why implementing this feature is particularly difficult? From my perspective, it is simply a pi/2 rotation of the colorbar with a repositioning. So far, when I really need to have the colorbar horizontal, I just export my graph in svg and do the manipulation manually in Inkscape. It's not practical when having many graphs to do but it does the trick for now. From this manipulation, one can see that the colorbar is a seperate element from the graph so it should be possible to give us a way to rotate and choose the position of the colorbar. |
Indeed graphically it's solely a question of rotation. The complexity lies partly in the automatic tick-label orientation, and in the interaction between the color bar, tick label lengths and the plot margins. If you have a color bar with long tick labels below a chart with long tick labels, there's a fair bit of interplay that we need to take into account to ensure that the tick labels don't overlap each other, or overlap the color bar, or run off the end of the plot. We would love a pull request for this feature if you feel you're able to easily put together a solution :) |
+1 |
I would greatly appreciate a solution for moving the color scale bar up top or horizontal below |
+1 |
Any updates on this :( |
One more upvote for a horizontal colorbar |
We are actually working on it : ) |
Awesome and thank you!!
Yes, one more upvote for this feature.
Jerone
Jerone Gagliano *PE, CEM*
*Founder & CEO*
brightbuilding.us
…On Mon, Nov 1, 2021 at 9:32 AM Antoine J.-P. Tixier < ***@***.***> wrote:
One more upvote for a horizontal colorbar
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1244 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AICJFGVJTKFSILIQB6SVAZ3UJ2JFFANCNFSM4CZHKZLQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Thanks @archmoj! Will this be in the next release of plotly.py? |
Yes |
Thanks @archmoj! will this be available for the R Plotly distribution, wether through ggplotly or plot_ly? |
@archmoj I'm using Plotly JavaScript 1.58.5 and I'm still not able to make the colorbar horizontal in a choropleth map. |
If you’re using 1.58.5 because it’s “latest” via CDN, please note that we did not advance the “latest” tag to v2.x, to avoid pushing breaking changes to users. Please use an explicit recent version, current is 2.24.2 |
the issue is since 2016 and still have not solved in 2025! @archmoj |
feature request: horizontal colorbar for heatmap, 3d graphs, etc.
The api for the colorbar seems to only allow for a colorbar positioned vertically.

But what if someone wants the bar displayed horizontally?
As far as I can tell from the api, this is not possible, but it would be nice to have.
The text was updated successfully, but these errors were encountered: