Skip to content

Matplotlib

Basic

Components of a Matplotlib Figure: Components of a Matplotlib Figure

Functions

  • plt.tight_layout(): Adjust the padding between and around subplots
  • plt.xticks(rotation=n): rotate x-axis
  • ax.tick_params("x", labelrotation=n): rotate multiple subplots' x-axis
  • plt.xlabel("name): set x label's name
  • plt.title("title"): set plot title