Created
December 4, 2020 00:04
-
-
Save moyocoyani/dfb4abce34ef77a626fc759c162781af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Canvas | |
| fig,ax = plt.subplots(1,1,figsize=(13,7.5),dpi=100) | |
| #Chart | |
| ax.plot(x,y) | |
| #Attributes axes | |
| ax.set_xlabel("Months", | |
| ha="left", | |
| size=16) | |
| ax.xaxis.set_label_coords(x=0, y=-0.08, transform=ax.transAxes) | |
| ax.set_ylabel("Random variable", | |
| ha="right", | |
| size=16) | |
| ax.yaxis.set_label_coords(x=-0.08, y=1.02, transform=ax.transAxes) | |
| ax.set_ylim(0,1000) | |
| plt.locator_params(axis='y', nbins=4) | |
| ax.spines['bottom'].set_linestyle("--") | |
| ax.spines['bottom'].set_linewidth(1) | |
| ax.spines["bottom"].set_color('#404040') | |
| #Attributes plot | |
| plt.suptitle("Lorem ipsum dolor sit amet", | |
| horizontalalignment = 'left', | |
| x=0.05, | |
| y=0.99, | |
| transform=fig.transFigure) | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment