You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You will see that the y-axis is log10rithmic and axis labels are 0.1 and 1 rather than 10^-1 and 10^0, due to the use of set_major_formatter().
Now uncomment the 2 commented lines and run it again. It seems that upon applying a twiny(), the set_major_formatter() action is removed and the y-axis is now displayed as 10^-1 and 10^0. Or more likely, the y-axis is "overwritten" with a new y-axis present in ax2. One can add another gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$')) before the show() and it works as intended. However, it seems like unexpected behavior to "lose" the formatting when twinning the axis to add a secondary x-axis. Any advice or agreement that this could be a bug?
Best,
Chris
The text was updated successfully, but these errors were encountered:
Christopher Graves reported this on the mailing list:
I do not think this is the expected behavior. First, run the following:
You will see that the y-axis is log10rithmic and axis labels are 0.1 and 1 rather than 10^-1 and 10^0, due to the use of set_major_formatter().
Now uncomment the 2 commented lines and run it again. It seems that upon applying a twiny(), the set_major_formatter() action is removed and the y-axis is now displayed as 10^-1 and 10^0. Or more likely, the y-axis is "overwritten" with a new y-axis present in ax2. One can add another gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$')) before the show() and it works as intended. However, it seems like unexpected behavior to "lose" the formatting when twinning the axis to add a secondary x-axis. Any advice or agreement that this could be a bug?
Best,
Chris
The text was updated successfully, but these errors were encountered: