Note
Click here to download the full example code
You can control the axis tick and grid properties
Traceback (most recent call last):
File "/build/matplotlib-tq5J6U/matplotlib-3.1.2/examples/subplots_axes_and_figures/axes_props.py", line 1
==========
^
SyntaxError: invalid syntax
==========
Axes Props
==========
You can control the axis tick and grid properties
"""
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()
Keywords: matplotlib code example, codex, python plot, pyplot Gallery generated by Sphinx-Gallery