I'm using matplotlib to plot a series of datas and get a result as below
But I'm expecting to have a non linear axis as below.
How can I make that kind of plot? Thanks in advance.
You can set the y-axis to logaritmic by writing plt.yscale('log')
full example:
import matplotlib.pyplot as plt
example = [pow(2,i) for i in range(10)]
plt.plot(example)
plt.yscale('log')
plt.show()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With