Skip to content

[Feature Request] expose the colorbar as a standalone graph object #3708

@12rambau

Description

@12rambau

I tried to post my issue/feature request on the forum but OAuth with Google was not working anymore.

Is your feature request related to a problem? Please describe.
I need to build a custom colorbar for an object that comes from outside of dash but for consistency with the rest of the application, I would like to use a dash based colorbar. My problem is that i don't found any ways to build one without building a graph next to it.

The most promising solution I found on the web is this: https://stackoverflow.com/questions/76963287/plotly-create-standalone-colorbar

but it's just a trick where i would make the real bar disapear.

Describe the solution you'd like
I would like to get access to the colorbar object the same way I have access to it in the matplotlib interface:

import matplotlib.pyplot as plt
import matplotlib as mpl

fig = plt.figure()
ax = fig.add_axes([0.05, 0.80, 0.9, 0.1])

cb = mpl.colorbar.ColorbarBase(ax, orientation='horizontal', 
                               cmap='RdBu')

plt.savefig('just_colorbar', bbox_inches='tight')
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions