I am trying to plot a diagonal line from point (0, 0) to (1, 1) in matplotlib
using a logarithmic x-scale. This is the MWE:
plt.plot([0, 1], [0, 1])
plt.xscale('log')
plt.show()
I would expect to see an exponential function in such a log-normal plane, something that I get using
x = np.linspace(0, 1, 100)
plt.plot(x, x)
but I see a ~horizontal line at y=1
. It is similar for the plt.yscale('log')
, but it is expectedly a ~vertical line at x=1
this time. Is this expected behaviour?