You are reading an old version of the documentation (v2.1.0). For the latest version see https://matplotlib.org/stable/gallery/subplots_axes_and_figures/axes_props.html
matplotlib
Fork me on GitHub


Travis-CI:

Related Topics

This Page

Axes PropsΒΆ

You can control the axis tick and grid properties

../../_images/sphx_glr_axes_props_001.png
import matplotlib.pyplot as plt
import numpy as np

t = np.arange(0.0, 2.0, 0.01)
s = np.sin(2 * np.pi * t)

fig, ax = plt.subplots()
ax.plot(t, s)

ax.grid(True, linestyle='-.')
ax.tick_params(labelcolor='r', labelsize='medium', width=3)

plt.show()

Total running time of the script: ( 0 minutes 0.021 seconds)

Gallery generated by Sphinx-Gallery