You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 2.1.1.post1094+g835fdc5
Fork me on GitHub

Related Topics

This Page

Log AxisΒΆ

This is an example of assigning a log-scale for the x-axis using semilogx.

import matplotlib.pyplot as plt
import numpy as np

fig, ax = plt.subplots()

dt = 0.01
t = np.arange(dt, 20.0, dt)

ax.semilogx(t, np.exp(-t / 5.0))

Gallery generated by Sphinx-Gallery