[FEATURE] Add method to construct a ColorBar #12736
Labels
python
Issues that should only require updating Python code
reso: completed
tag: API: plotting
type: feature
Milestone
As discussed with @bryevdv, we don't have a simple way to create a ColorBar when using linear_cmap() or log_cmap() (i.e. without explicitly importing and defining a ColorBar object).
The following code works, but it would be good to have an explicit method for this, similar to the construct method for the contour renderer.
Optimally, this should work like this:
The
construct_color_bar
method would take some arguments, including an argument to define if the color_bar should use the mapper associated with a glyph's line or fill color (default to fill color). There also needs to be an error check to verify that the fill_color or line_color is a transform with a colormapper.The text was updated successfully, but these errors were encountered: