Skip to content

Instantly share code, notes, and snippets.

@moyocoyani
Last active January 13, 2023 16:37
Show Gist options
  • Save moyocoyani/6b1e01f9512a7cb3d8fb6b88a1ae1c75 to your computer and use it in GitHub Desktop.
Save moyocoyani/6b1e01f9512a7cb3d8fb6b88a1ae1c75 to your computer and use it in GitHub Desktop.
#Canvas
fig,ax = plt.subplots(1,1,figsize=(13,7.5),dpi=100)
#Chart
ax.plot(x,y,color=palette["primary_chart"],
zorder=2)
ax.scatter(x,y,color=palette["background"],
edgecolor=palette["primary"],
s=90,
zorder=3)
#Axes configuration
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)
#Plot configuration
plt.locator_params(axis='y', nbins=4)
ax.spines['bottom'].set_linestyle("--")
ax.spines['bottom'].set_linewidth(1)
ax.spines["bottom"].set_color('#404040')
plt.suptitle("Lorem ipsum dolor sit amet",
horizontalalignment = 'left',
x=0.05,
y=0.99,
transform=fig.transFigure,
color=palette["background"],
bbox=dict(facecolor=palette["primary"], edgecolor="none", pad=10.0))
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment