0

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.

JJC
  • 1
  • You are leaving out a lot of important information. How are you specifying to save the `.png` file? That should be included in the code block of the post, as done [here](https://stackoverflow.com/q/74184439/8508004). What version of Kaleido are you using along with what version of Plotly? In fact, the code block with your question should be a minimal reproducible example, see [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask). Where are your imports, etc.? Based on [there](https://stackoverflow.com/q/74184439/8508004), my guess would be you have a version mismatch. – Wayne Aug 01 '23 at 01:14

0 Answers0