Is there a go.Barpolar colorbar?

Hi

I am trying to plot a Barpolar() plot with a colorbar next to it.
Does Barpolar() offer such a feature? - I canā€™t figure it out from the documentation.

One alternative I found was px.bar_polar().

Thanks a lot for your help,
Martin

@vont,
Yes, there is a colorbar, but it is a a marker property , used when the marker color is an array of values to be mapped onto a colorscale:

import numpy as np
import plotly.graph_objects as go
r, theta = np.meshgrid(np.linspace(0, 1, 10), np.linspace(0, 360, 18))

fig = go.Figure(go.Barpolar(
    r= r.flatten(),
    theta=theta.flatten(),
    marker_color=(r.flatten())**2-0.2, #marker_color is a function of radius
    marker_colorscale="viridis", marker_colorbar_thickness=24,
    marker_cmin=0, marker_cmax=1))
fig.update_layout(width=500, height=500)

barpolar-colormapped

or marker_color is an array of values independent on r and theta:

theta=np.linspace(0, 360, 18)
r= np.ones(theta.shape)
fig = go.Figure(go.Barpolar(
    r= r.flatten(),
    theta=theta,
    marker_color=np.random.rand(18),   ,
    marker_colorscale="ice", marker_colorbar_thickness=24,
   ))
fig.update_layout(width=500, height=500)

barpolar-colormapped1

Thanks a lot for your help empet! I am still struggling a bit to read the docs but thatā€™s because I am new I guess. :slightly_smiling_face:
I saw that there was the class plotly.graph_objects.barpolar.Marker and that it has an argument colorbar=None but I didnā€™t know how to access it when creating the figure with
fig = go.Figure(go.Barpolar(ā€¦)

I kept typing a dot instead of an underscore between ā€œmarkerā€ and its property ā€œcolorbarā€.
Something like this ā€œmarker.colorbar.bgcolor = ā€˜crimsonā€™ā€ instead of ā€œmarker_colorbar_bgcolor = ā€˜crimsonā€™ā€.

Thanks so much and have a nice weekend!