Note
Go to the end to download the full example code.
AxesΒΆ
This example shows various axes command to position matplotlib axes.
![plot axes 2](../../../_images/sphx_glr_plot_axes-2_001.png)
import matplotlib.pyplot as plt
plt.axes([0.1, 0.1, 0.5, 0.5])
plt.xticks([])
plt.yticks([])
plt.text(
0.1, 0.1, "axes([0.1, 0.1, 0.5, 0.5])", ha="left", va="center", size=16, alpha=0.5
)
plt.axes([0.2, 0.2, 0.5, 0.5])
plt.xticks([])
plt.yticks([])
plt.text(
0.1, 0.1, "axes([0.2, 0.2, 0.5, 0.5])", ha="left", va="center", size=16, alpha=0.5
)
plt.axes([0.3, 0.3, 0.5, 0.5])
plt.xticks([])
plt.yticks([])
plt.text(
0.1, 0.1, "axes([0.3, 0.3, 0.5, 0.5])", ha="left", va="center", size=16, alpha=0.5
)
plt.axes([0.4, 0.4, 0.5, 0.5])
plt.xticks([])
plt.yticks([])
plt.text(
0.1, 0.1, "axes([0.4, 0.4, 0.5, 0.5])", ha="left", va="center", size=16, alpha=0.5
)
plt.show()
Total running time of the script: (0 minutes 0.050 seconds)