Created
April 18, 2019 19:07
-
-
Save MLWhiz/e863c2013a975c2392f1cf9794359519 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
sns.set(style="ticks") | |
flatui = ["#9b59b6", "#3498db", "#95a5a6", "#e74c3c", "#34495e", "#2ecc71"] | |
# This Function takes as input a custom palette | |
g = sns.barplot(x="sex", y="tip", hue="day", | |
palette=sns.color_palette(flatui),data=tips,ci=None) | |
# remove the top and right line in graph | |
sns.despine() | |
# Set the size of the graph from here | |
g.figure.set_size_inches(12,7) | |
# Set the Title of the graph from here | |
g.axes.set_title('Do We tend to \nTip high on Weekends?', | |
fontsize=34,color="b",alpha=0.3) | |
# Set the xlabel of the graph from here | |
g.set_xlabel("Gender",size = 67,color="g",alpha=0.5) | |
# Set the ylabel of the graph from here | |
g.set_ylabel("Mean Tips",size = 67,color="r",alpha=0.5) | |
# Set the ticklabel size and color of the graph from here | |
g.tick_params(labelsize=14,labelcolor="black") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment