Loading...
Loading...
Best practices for Matplotlib data visualization, plotting, and creating publication-quality figures in Python
npx skill4agent add mindrally/skills matplotlib-best-practicesfig, ax = plt.subplots()ax.plot()ax.set_xlabel()plt.plot()plt.xlabel()%matplotlib inlineax.plot()ax.scatter()ax.bar()ax.barh()ax.hist()ax.boxplot()ax.imshow()ax.pcolormesh()ax.annotate()plt.subplots(nrows, ncols)gridspecsharex=Truesharey=Trueconstrained_layout=Truetight_layout()figsize=(width, height)plt.style.use('seaborn-v0_8')'ggplot'plt.style.use(['seaborn-v0_8', 'custom.mplstyle'])r'$\alpha = \frac{1}{2}$'bbox_inches='tight'facecolordpitransparent=Truerasterized=Trueplt.close()plt.close('all')import matplotlib.pyplot as plt