KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How can I stop the y-axis displaying a logarithmic notation label on the y-axis? I'm happy with the logarithmic scale, but want to display the absolute values, e.g. [500, 1500, 4500, 11000, 110000] on the Y-axis. I don't want to explicitly label each tick as the labels may change in the future (I've tried out the different formatters but haven't successfully gotten them to work). Sample code below. Thanks, -collern2 import matplotlib.pyplot as plt import numpy as np a = np.array([500, 1500, 4500, 11000, 110000]) b = np.array([10, 20, 30, 40, 50]) fig = plt.figure() ax = fig.add_subplot(1,1,1) ax.set_yscale('log') plt.plot(b, a) plt.grid(True) plt.show()
Tags (comma-separated)
Save Edits
Cancel