Questions tagged [relplot]

This is for seaborn relplot, which is a figure-level plot for scatter and line plots. When using this tag, also use the python and seaborn tags.

26 questions
30
votes
1 answer

Prevent sharing the y-axis in a relplot

I'm having trouble getting seaborn's relplot function to plot with different y axes on each row (while sharing x axes per column). I can see that both the FacetGrid and catplot methods in seaborn have a sharex/sharey keyword argument that would…
Sooraj Achar
  • 313
  • 3
  • 5
8
votes
3 answers

How to customize titles and y labels in a relplot

I currently have a seaborn relplot harker = sns.relplot(data = majorsLong, x = "SiO2", y = "Wt %", palette = colors, markers = marks, style = "Lithology", hue = "Lithology", kind = "scatter", col = "Oxide",…
Imperator
  • 105
  • 1
  • 6
6
votes
3 answers

How to add additional plots to a seaborn FacetGrid and specify colors

Is there a way to create a Seaborn line plot with all the lines gray and the mean as a red line? I'm trying to do this with relplot but I don't know how to separate the mean from the data (and it appears the mean isn't being plotted?). Make…
a11
  • 3,122
  • 4
  • 27
  • 66
4
votes
1 answer

How to add an empty facet to a relplot or FacetGrid

I have a relplot with columns split on one variable. I'd like to add one additional column with no subplot or subpanel. To give a clear example, suppose I have the following plot: import matplotlib.pyplot as plt import numpy as np import pandas as…
Rylan Schaeffer
  • 1,945
  • 2
  • 28
  • 50
3
votes
1 answer

Legend issues when mapping plot to FacetGrid

I've also opened an issue in the seaborn git repo here. However, instead of a bug, it's quite possible that instead I'm making some basic error - but I haven't figured it out yet... Question: The same color is assigned to two different values in the…
Ben
  • 958
  • 6
  • 7
3
votes
1 answer

Error Bars not displaying Seaborn Relplot

Using this code I created a seaborn plot to visualize multiple variables in a long format dataset. import pandas as pd import seaborn as sns data = {'Patient ID': [11111, 11111, 11111, 11111, 22222, 22222, 22222, 22222, 33333, 33333, 33333, 33333,…
John Conor
  • 722
  • 6
  • 20
3
votes
1 answer

How to invert the axis of a seaborn figure-level plot (FacetGrid)

I would like to invert the y-axis in each plot of a Facetgrid. Below you find a reduced example of the code: import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt df_test = pd.DataFrame({'a':['yes', 'no']*5,…
Cider
  • 95
  • 7
2
votes
1 answer

How to use mplcursors to annotate with a complete dataframe row in a multigrid plot

I'm trying to plot a multi-dimensional scatterplot across several visual properties (facets, hue, shape, x, y). I'm also trying to get a tooltip on cursor hover to show additional properties of the point. (I'm using seaborn + mplcursors, but I'm not…
diyer0001
  • 33
  • 4
2
votes
2 answers

Introducing a second y axis into a relplot() call with multiple plots

The Problem I have 2 dataframes which I combine and then melt with pandas. I need to multi-plot them (as below) and the code needs to be scalable. They consist of 2 variables which form the 'key' column below ('x' and 'y' here), across multiple…
Ndharwood
  • 123
  • 3
  • 11
2
votes
1 answer

How to specify the palette in a seaborn figure-level plot

I've learned to not use seaborn if I need to make specific changes or detail oriented visualizations but I feel like I'm not fully utilizing what it has to offer at times. I have a series of 2D slices plotting cluster memberships. Issue is between…
Jaynkumz
  • 23
  • 1
  • 6
2
votes
1 answer

seaborn.lmplot raises ValueError when set both `hue` and `scatter_kws`'s `s`

This code is provided in the book "Pandas for everyone" (3.4.3.2 Size and Shape). import seaborn as sns from matplotlib import pyplot as plt tips = sns.load_dataset('tips') sns.lmplot( x='total_bill', y='tip', data=tips, …
noobar
  • 803
  • 10
  • 15
2
votes
1 answer

How to plot data from multiple dataframes with seaborn relplot

I want to plot two lines on the same set of axes. It seems sns.relplot is creating a facetted figure, and I don't know how to specify that I want the second line on the same facet as the first. Here's a MWE import numpy as np import pandas as…
zazizoma
  • 437
  • 1
  • 7
  • 18
1
vote
1 answer

How can I plot st error bars with seaborn relplot?

I am studying different variables. I want to plot the results with the stadnard error. I use the filter function because depending on what I want to analyse, I am interested in just plotting mineral, or just plotting one material...etc. I mention…
1
vote
1 answer

How to set log scale minor ticks on xaxis for all relplot subplots after using .set

import pandas as pd import seaborn as sns tips = sns.load_dataset("tips") tips['total_bill']=tips.total_bill*10**(tips.index/60+2) sns.set(font_scale=2) g=sns.relplot(data=tips,height=5, x="total_bill", y="tip", hue="day",…
WilsonF
  • 85
  • 6
1
vote
1 answer

How to set axis label format to scientific format in seaborn relplot with facets when axes are not shared

I am creating a facet plot with the seaborn library with: titanic = sns.load_dataset('titanic') g = sns.relplot(data=titanic, x='fare', y='age', col='sex', row='survived', height=2, facet_kws=dict(sharex=False,…
Soerendip
  • 7,684
  • 15
  • 61
  • 128
1
2