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,color=palette["primary_chart"], | |
zorder=2) | |
ax.scatter(x,y,color=palette["background"], | |
edgecolor=palette["primary"], | |
s=90, | |
zorder=3) |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib as mpl | |
#Data to plot | |
x=np.linspace(1,12,12) | |
y=[341,657,424,363,123,544,176,566,737,861,651,719] | |
palette={"primary":"#FEF702", | |
"background": "#252525", |
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
import seaborn as sns | |
#Dataset | |
tips = sns.load_dataset("tips") | |
#Plot---------------- | |
#Canvas | |
fig,ax = plt.subplots(1,1,figsize=(13,7.5),dpi=100) | |
#Chart |
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
import seaborn as sns | |
#Dataset | |
tips = sns.load_dataset("tips") | |
#Plot---------------- | |
#Canvas | |
fig,ax = plt.subplots(1,1,figsize=(13,7.5),dpi=100) | |
#Chart |
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
import pandas as pd | |
#Dataset | |
cats=["cats","dogs","hamster"] | |
votes=[134,125,77] | |
df = pd.DataFrame({'categories':cats, | |
'votes': votes}) | |
#Plot---------------------------------- | |
#Canvas |
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,color=palette["primary_chart"], | |
zorder=2) | |
ax.scatter(x,y,color=palette["background"], | |
edgecolor=palette["primary"], | |
s=90, | |
zorder=3) |
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) |
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
#Color for charts elements--------------------------------- | |
#Background color | |
mpl.rcParams["figure.facecolor"] = palette["background"] | |
mpl.rcParams["axes.facecolor"] = palette["background"] | |
mpl.rcParams["savefig.facecolor"] = palette["background"] | |
mpl.rcParams['axes.labelcolor']= palette["text_color"] |
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) | |
#Axttributes axes | |
ax.set_xlabel("Months", | |
ha="left", | |
size=16) |
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 axesax.set_xlabel("Months") | |
ax.set_ylabel("Random variable") | |
ax.spines['bottom'].set_linestyle("--") | |
ax.spines['bottom'].set_linewidth(1) |
NewerOlder