Questions tagged [jointplot]

For plotting a jointplot in python or r, using seaborn or ggExtra

Joint Plots are used to explore relationships between bivariate data, as well as their distributions at the same time. Typically, a joint plot consists of a central plot with s at the top and right edges. The scatter plot shows data from both variables, while each histogram describes a single variable.

In the plotting library has a sns.jointplot function.
In the library ggExtra provides a function ggMarginal for extending ggplot2 scatterplots.

51 questions
33
votes
2 answers

How to log scale in seaborn

I'm using seaborn to plot some biology data. I want a distribution of one gene against another (expression in ~300 patients), and the following code works fine. graph = sns.jointplot(x='Gene1', y='Gene2', data=data, kind='reg') I like that the…
julianstanley
  • 1,367
  • 4
  • 13
  • 26
13
votes
2 answers

Getting colorbar in a hex jointplot

I'm interested in using the seaborn joint plot for visualizing correlation between two numpy arrays. I like the visual distinction that the kind='hex' parameter gives, but I would also like to know the actual count that different shades correspond…
Vincent
  • 131
  • 1
  • 3
10
votes
2 answers

How to set the line style for each kdeplot in a jointgrid

I am using seaborn to create a kdeplot with marginal distribution as described in this answer. I adapted the code a little to give me this: import matplotlib.pyplot as plt import seaborn as sns iris = sns.load_dataset("iris") setosa =…
malexmave
  • 1,283
  • 2
  • 17
  • 37
8
votes
4 answers

How to overlay a Seaborn jointplot with a "marginal" (distribution histogram) from a different dataset

I have plotted a Seaborn JointPlot from a set of "observed counts vs concentration" which are stored in a pandas DataFrame. I would like to overlay (on the same set of axes) a marginal (ie: univariate distribution) of the "expected counts" for each…
Nonchalant
  • 93
  • 1
  • 1
  • 6
7
votes
1 answer

Bin size seaborn jointplot

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?
Sylvain
  • 253
  • 2
  • 7
  • 18
7
votes
1 answer

How to edit the ticks in jointplot or JointGrid

How can I change the tick placement in a seaborn jointplot or JointGrid? I'm looking for something similar to matplotlib's plt.xticks.
user3600497
  • 1,621
  • 1
  • 18
  • 22
6
votes
1 answer

How to add a colorbar to the side of a kde jointplot

I'm trying to plot a colorbar next to my density plot with marginal axes. It does plot the colorbar, but unfortunately not on the side. That's what a tried so far: sns.jointplot(x,y, data=df3, kind="kde", color="skyblue", legend=True, cbar=True, …
Mel
  • 81
  • 2
  • 4
6
votes
1 answer

How to set seaborn jointplot axis to log scale

How to set axis to logarithmic scale in a seaborn jointplot? I can't find any log arguments in seaborn.jointplot Notebook import seaborn as sns import pandas as pd df =…
Rutger Hofste
  • 4,073
  • 3
  • 33
  • 44
5
votes
1 answer

How to move or remove the legend from a seaborn JointGrid or jointplot

How to remove the legend in the seaborn.JoingGrid plot? The reference code is like below: import matplotlib.pyplot as plt import seaborn as sns penguins = sns.load_dataset("penguins") g = sns.JointGrid(data=penguins, x="bill_length_mm",…
Hyunseung Kim
  • 493
  • 1
  • 6
  • 17
5
votes
2 answers

How to get jointplot markers with no fill

matplotlib.pyplot.scatter() has a facecolors=None argument that will give datapoints the appearance of being hollow on the inside. How to get the same look for seaborn.jointplot()? The same argument was found in previous versions of seaborn but was…
develarist
  • 1,224
  • 1
  • 13
  • 34
4
votes
1 answer

How to add manually customised seaborn plots to JointGrid/jointplot

I want to use the seaborn JointGrid/jointplot. In the middle I would like to add a sns.regplot. On the Margins two sns.distplots or histograms. Thats not a problem, but I would like to custmize all three pplots differently and add different fiiting…
tim__25
  • 41
  • 1
  • 5
3
votes
1 answer

Seaborn jointplot annotate with correlation

Before the release of the latest seaborn version, I was able to use the following to annotate my plot with the pearson Rho. Using the latest version I am unable to find a way to do the same as #ax.annotate(stats.pearsonr) throws an error. import…
seralouk
  • 30,938
  • 9
  • 118
  • 133
2
votes
2 answers

How to normalize histograms in joinplot margins

How can I normalize the histograms in sns.jointplot? Right now I'm getting this plot However, instead of showing 0, 200, 400 on the axis, I would like it to be a fraction of the total number of the dataset This is my code: import numpy as np import…
JohnGoodWill
  • 83
  • 1
  • 7
2
votes
2 answers

How to scale marginal kdeplot of seaborn jointplot with imbalanced categorical data

How to scale marginal kdeplot of seaborn jointplot? Let's imagine that we have 1000 datum of kind 'a', 100 datum of kind 'b', and '100' datum of kind 'c'. In this case, the marginal kdeplot's scale doesn't seem identical because the size of…
Hyunseung Kim
  • 493
  • 1
  • 6
  • 17
2
votes
1 answer

Multiple marginal plots with Seaborn jointgrid plot

I'd like to draw a jointgrid plot with multiple marginal plots like below: The reference code is: import matplotlib.pyplot as plt import pandas as pd import seaborn as sns penguins =…
Hyunseung Kim
  • 493
  • 1
  • 6
  • 17
1
2 3 4