Skip to content

Instantly share code, notes, and snippets.

@moyocoyani
Last active December 6, 2020 18:02
Show Gist options
  • Save moyocoyani/e93368e67c847a535faf6d43fd14e827 to your computer and use it in GitHub Desktop.
Save moyocoyani/e93368e67c847a535faf6d43fd14e827 to your computer and use it in GitHub Desktop.
#Data to plot:
x=np.linspace(1,12,12)
y=[341,657,424,363,123,544,176,566,737,861,651,719]
#Canvas
fig,ax = plt.subplots(1,1,figsize=(13,7.5),dpi=100)
#Chart
ax.plot(x,y)
#Attributes axes
ax.set_xlabel("Months")
ax.set_ylabel("Random variable")
ax.spines['bottom'].set_linestyle("--")
ax.spines['bottom'].set_linewidth(1)
ax.spines["bottom"].set_color('#404040')
ax.set_ylim(0,1000)
#Attributes plot
plt.locator_params(axis='y', nbins=4)
plt.suptitle("Lorem ipsum dolor sit amet")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment