Plot logarithmic axes

I want to plot a graph with one logarithmic axis using matplotlib.

Sample program:

import matplotlib.pyplot as plt
a = [pow(10, i) for i in range(10)]  # exponential
fig = plt.figure()
ax = fig.add_subplot(2, 1, 1)

line, = ax.plot(a, color='blue', lw=2)
plt.show()

← Назад к списку