facet-grid Questions
4
Using facet_grid(), how can I place the group names, i.e. the grey strips, on the top of the plots when graphing the plots stacked vertically in a single column?
From what I have tried, when stacki...
Pukka asked 13/6, 2020 at 6:9
3
Solved
I am working with the FacetGrid example presented here that results in the plot below. In my data set, there is quite a lot of plots, and it would be convenient to have the x axis labels repeated f...
Eucaine asked 5/9, 2018 at 9:58
3
Solved
This post describes a method to create a two-line x-axis (year below months) on a time series plot. Unfortunately, the method that I use from this post (option 2) is not compatible with ggsave().
...
Nieshanieto asked 28/9, 2018 at 11:56
2
The seaborn documentation is pretty unclear about the differences, and I can't figure them out. It seems like they have very similar, if not identical, functionality.
seaborn.FacetGrid.map
seaborn....
Rentschler asked 15/9, 2020 at 17:49
2
Solved
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 ...
Umpteen asked 29/5, 2019 at 15:9
3
Solved
I'm using sns.lmplot to plot a linear regression, dividing my dataset into two groups with a categorical variable.
For both x and y, I'd like to manually set the lower bound on both plots, but leav...
Iorgo asked 8/8, 2014 at 22:12
2
Solved
Intro
I want to draw lines between a faceted ggplot. The main goal is to connect those measurements with a line which we want to test against. So basically I want to insert some kind of significanc...
Homestead asked 1/8, 2023 at 15:48
3
Solved
For example,
library(ggplot2)
ggplot(mpg, aes(displ, cty)) + geom_point() + facet_grid(cols = vars(drv))
How can I change the distance between the strip and the main plot? (For example, create ...
Cambria asked 13/4, 2019 at 4:24
1
I tried using sns.set_style("white"), but the spines only cover the bottom and left side. How can I set the spines all around the figure?
I also tried plt.subplots_adjust(right=0.1, top=0...
Elias asked 25/5, 2023 at 15:48
3
Solved
Say, I make a gpplot2 plot like the following with several facets:
ggplot(iris) +
geom_tile(aes(x = Petal.Width, fill = Sepal.Width, y = Petal.Length)) +
facet_wrap(~Species)
Note that there ...
Jeaz asked 14/7, 2017 at 18:10
3
Solved
Is there a way to first change the facet label from 1:3 to something like c(good, bad, ugly). Also, i would like to add R2 value to each of the facet. Below is my code- i tried a few things but did...
Animus asked 10/2, 2020 at 1:36
2
Solved
I just can't figure out how to change the xlabels in a Seaborn FacetGrid. It offers a method for changing the x labels with set_xlabels() but unfortunately not individually for each subplot.
I have...
Pasley asked 12/4, 2016 at 12:48
3
Solved
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 a...
Dannielledannon asked 19/5, 2021 at 22:20
3
Solved
My challenge is to overlay a custom line function graph over a scatter plot I already have, the code looks like follows:
base_beta = results.params
X_plot = np.linspace(0,1,400)
g = sns.FacetGri...
Appanage asked 6/10, 2017 at 4:37
3
Solved
I am trying to create a FacetGrid in Seaborn
My code is currently:
g = sns.FacetGrid(df_reduced, col="ActualExternal", margin_titles=True)
bins = np.linspace(0, 100, 20)
g.map(plt.hist, &...
Headmistress asked 11/5, 2017 at 15:54
5
Solved
A have produced a boxplot with Facetgrid in seaborn the following way
# Import the dataset
tips = sns.load_dataset("tips")
# Plot using FacetGrid, separated by smoke
plt.style.use('ggplo...
Montherlant asked 17/8, 2018 at 8:32
2
In a Seaborn FacetGrid, how can I get the y-axis tick labels to show up in all the subplots, regardless of whether or not sharey=True?
tips = sns.load_dataset("tips")
g = sns.FacetG...
Bosh asked 4/5, 2021 at 18:18
1
Solved
I want to add a vertical line to every subplot to mark the individual launch date of each product. Every vertical line should display the date. But i am too beginner to figure this out. I tried .ax...
Sequence asked 11/2, 2021 at 12:27
2
Solved
Say I have a facetted ggplot like this:
data(iris)
ggplot(iris, aes(x = Petal.Width, y = Sepal.Length)) +
facet_grid(. ~ Species) +
geom_point()
Question:
Is it possible to align only the 1st f...
Roar asked 16/9, 2020 at 3:15
2
Solved
I'm not able to rotate my xlabels in Seaborn/Matplotlib. I have tried many different solutions but not able to fix it. I have seen many related questions here on stackoverflow, but they have not wo...
Williamswilliamsburg asked 15/9, 2020 at 20:24
1
Solved
I am trying to plot two displots side by side with this code
fig,(ax1,ax2) = plt.subplots(1,2)
sns.displot(x =X_train['Age'], hue=y_train, ax=ax1)
sns.displot(x =X_train['Fare'], hue=y_train, ax=a...
Orton asked 15/9, 2020 at 5:1
1
Solved
I want to format y-axis labels in a seaborn FacetGrid plot, with a number of decimals, and/or with some text added.
import seaborn as sns
import matplotlib.pyplot as plt
sns.set(style="ticks&q...
Asymmetric asked 2/9, 2020 at 17:18
4
Solved
I'd like to create a figure using ggplot2's facet_grid, like below:
# Load ggplot2 library for plotting
library(ggplot2)
# Plot dummy data
p <- ggplot(mtcars, aes(mpg, wt))
p <- p + geom...
Weiweibel asked 9/5, 2019 at 16:43
7
Solved
How do I add a title to this Seaborne plot? Let's give it a title 'I AM A TITLE'.
tips = sns.load_dataset("tips")
g = sns.FacetGrid(tips, col="sex", row="smoker", margin_titles=True)
g.map(sns.plt...
Sauveur asked 23/4, 2015 at 4:28
1
Solved
Is there a canonical way to add facet titles within facet_grid? Or a way to specific row labels in facet_wrap? (Without geom_text, geom_label, or grob manipulation.)
Consider:
dat <- data.frame(...
Yuji asked 23/6, 2020 at 17:25
1 Next >
© 2022 - 2024 — McMap. All rights reserved.