Skip to content

Feature request: support colorbar.title.text alignment #7508

@Lexachoc

Description

@Lexachoc

Reproducible example

Demo 1 : https://codepen.io/Lexachoc/pen/gbaWEPG
Demo 2 with ternary plot: https://codepen.io/Lexachoc/pen/myemoOB

The problem

There is currently no option to configure the colorbar.title.text alignment. It is always left-aligned.

Image

I've seen posts in the forum and on Stackoverflow asking how to do this, but it is not possible:
https://community.plotly.com/t/fine-grained-position-of-a-colorbar-title/43430
https://stackoverflow.com/questions/69581222/how-do-you-center-the-color-scale-as-per-title-on-plotly

Why this is important

Sometimes we have longer title text. Alignment can help us create a better look with nice alignment.
Even if we break the text with <br>, it is still left-aligned.

Imaging to have a ternary plot like below:

Image

Since the colorbar.title.text is left-aligned, we wasted a lot of space on the right side!

If we could adjust the alignment of the colorbar.title.text to that it is right-aligned, illustrated as below:

Image

We can save a lot of space and enlarge the ternary diagram!

Othrewise, the entire colorbar takes up space and makes the main ternary diagram smaller!

It looks crazy, but you should see that it is obviously affected by the colorbar.title.text in the color bar:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy