Created
April 18, 2019 19:05
-
-
Save MLWhiz/1d9be661829562d9052840509e10cbb3 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
# We dont Probably need the Gridlines. Do we? If yes comment this line | |
sns.set(style="ticks") | |
# Here we create a matplotlib axes object. The extra parameters we use | |
# "ci" to remove confidence interval | |
# "marker" to have a x as marker. | |
# "scatter_kws" to provide style info for the points.[s for size] | |
# "line_kws" to provide style info for the line.[lw for line width] | |
g = sns.regplot(x="tip", y="total_bill", data=tips, ci = False, | |
scatter_kws={"color":"darkred","alpha":0.3,"s":90}, | |
line_kws={"color":"g","alpha":0.5,"lw":4},marker="x") | |
# remove the top and right line in graph | |
sns.despine() | |
# Set the size of the graph from here | |
g.figure.set_size_inches(12,8) | |
# Set the Title of the graph from here | |
g.axes.set_title('Total Bill vs. Tip', fontsize=34,color="r",alpha=0.5) | |
# Set the xlabel of the graph from here | |
g.set_xlabel("Tip",size = 67,color="r",alpha=0.5) | |
# Set the ylabel of the graph from here | |
g.set_ylabel("Total Bill",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