I need the y-axis of my graph to be on a log scale. When I do so, however, the y-axis' label, tick marks, and title disappear.
plt.figure(2)
plt.semilogy(data2[0, :, 0], sli)
plt.xlabel('n-value')
plt.ylabel('Intensity')
plt.title('Intensity vs. n-shell')
plt.show()
The sli
values range from 1.0e-21 to 1.0e-8
When I zoom in far enough though, the label and title actually return but not the tick marks. Don't know if that matters, but thought I'd include it.
Thanks
Edit: As it turns out, the code works fine, just not on my mac laptop. I tested the code on a friends computer running ubuntu and it worked perfectly. So, I guess my log scales don't like macs. Still, anybody have any suggestions?
"Update" for @ImportanceOfBeingErnest
Nothing has changed.
Graph produced from my code run with updated mplib
Graph produced from @Engineero 's code run with updated mplib