Plotly not saving tick format correctly

36 Views Asked by At

I am building a figure with 2 yaxis (yaxis1 and yaxis2). Both of the yaxis are logarithmic, but the yaxis2 has specific tick formatting, with tickmode = 'array'. The figure appears fine in my Jupyter Notebook, but not when I save it as .pdf, .png, or .jpeg.

yaxis1=dict(title='',
zeroline=False,
linecolor = 'grey',
mirror = True,
type = 'log',
range = [-2.301,2],
),

yaxis2=dict(title='',
zeroline=False,
linecolor = 'grey',
mirror = True,
 type = 'log',
range = [-2.301,2],
tickmode = 'array',
tickvals = [0.005, 0.01, 0.05, 0.1, 0.5, 1, 5, 10, 50, 100],
ticktext = ['0.006','0.012','0.062','0.124','0.622','1.244','6.222','12.44', '62.22', '124.4'],
anchor="free",
overlaying="y",
side="right",
position=1
),

thank you!

Image in Jupiter Notebook

Saved .png

Everything looks good in the notebook but not once the image is saved. I tried playing around with various yaxis properties, but nothing worked.

0

There are 0 best solutions below