Bin size seaborn jointplot
Asked Answered
B

1

7

I have an array of 90 000 pairs I want to plot with seaborn jointplot. Is there a way to adjust side histograms bin size? Should I try to plot it with an other package?enter image description here

Boresome answered 4/12, 2015 at 18:57 Comment(0)
S
11

You should be able to use marginal_kws to adjust the bins. Lifting the example from the seaborn documentation here

Tested in python 3.10, matplotlib 3.5.1, seaborn 0.11.2

import seaborn as sns

# load sample data
iris = sns.load_dataset('iris')

g = sns.jointplot(x="petal_length", y="sepal_length", data=iris,
                   marginal_kws=dict(bins=30), s=40)

enter image description here

  • without using marginal_kws
g = sns.jointplot(x="petal_length", y="sepal_length", data=iris, s=40)

enter image description here

Syllabogram answered 7/12, 2015 at 18:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.