plotly.py
plotly.py copied to clipboard
.full_figure_for_development() doesn't show all computed data for go.Carpet
I want to set text ticktext along the baxis
of a go.Carpet
but couldn't figure out how to format ticktext
and tickvals
in the Carpet
constructor. I tried to use .full_figure_for_development()
to inspect what is set by default but these key-values pairs are missing from
A simple example:
import plotly.graph_objects as go
fig = go.Figure()
a = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
b = [4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6]
b2 = ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c']
y = [1, 1.4, 1.6, 1.75, 2, 2.5, 2.7, 2.75, 3, 3.5, 3.7, 3.75]
fig.add_trace(go.Carpet(
a = a,
b = b, # b2,
y = y,
aaxis = dict(
tickprefix = 'a = ',
),
baxis = dict(
tickprefix = 'b = ',
smoothing = 0,
# tickmode = 'array',
# ticktext = b2, # ['a', 'b', 'c'],
# tickvals = b, # [4, 5, 6]
)
))
fig.show()
full_fig = fig.full_figure_for_development()
print(full_fig.data[0]['baxis']) # ticktext and tickvals missing!
i.e. I want to figure out how to set b = 4
to b = 6
to a
, b
, and c