Reut
Reut

Reputation: 1592

Seaborn graph visualization

I have created a jointplot graph in seaborn using jupiter. For some reason the output graph has different visualization- I wish to have grid on the background. I have seen few examples and I think my code is the same but for some reason I can't get the same visualization.

This is how I would like my plot to look like-

enter image description here

and this is how my output looks like-

enter image description here

this is the code I have used. th epart of importing the data is missing.-

import seaborn as sns
sns.set(style="white", color_codes=True)
sns.jointplot(data=data, x= 'Time on Website', y='Yearly Amount Spent')

My goal is to have the grid as background with resembling output to the first graph.

Upvotes: 0

Views: 145

Answers (1)

baccandr
baccandr

Reputation: 1130

You can use sns.set_style("whitegrid"), here a simple example:

import numpy as np, pandas as pd; np.random.seed(0)
import seaborn as sns

sns.set_style("whitegrid")
tips = sns.load_dataset("tips")
g = sns.jointplot(x="total_bill", y="tip", data=tips)

this is the output:

enter image description here

Upvotes: 1

Related Questions