Questions tagged [facet-grid]

Facet grid is a presentation form which includes panels defined by facetting variables. Facet grid is allowed to show all existed combinations of the concerned variables to reveal relationships between them.

Facet grid is a presentation form which includes panels defined by facetting variables. Facet grid is allowed to show all existed combinations of the concerned variables to reveal relationships between them.

Some graph packages have facet grid plotting tools:

: ggplot2 facet_grid examples

: seaborn FacetGrid examples

642 questions
0
votes
0 answers

ggplot facet_grid yields in a wrong outcome?

I have a data set in R of appointments from different departments. > dput(head(Data.2016)) structure(list(NUMMER = c(361626L, 411992L, 2752868L, 6592340L, 9017183L, 451010L), DEPARTMENT= structure(c(3L, 3L, 3L, 3L, 3L, 3L), .Label =…
D.Cirkel
  • 65
  • 1
  • 8
0
votes
1 answer

Patches in facetgrid - Python

I'm beginning on Python I want to add patches to a facet-grid with the following code and I get AttributeError: 'FacetGrid' object has no attribute 'add_patch'. I've done some extensive research but can't find any solution to this issue. import…
MattnDo
  • 444
  • 1
  • 5
  • 17
0
votes
1 answer

How to make plots scales the same or trun them into Log scales in ggplot

I am using this script to plot chemical elements using ggplot2 in R: # Load the same Data set but in different name, becaus it is just for plotting elements as a well log: Core31B1 <- read.csv('OilSandC31B1BatchResultsCr.csv', header = TRUE) # #…
Majed86
  • 370
  • 5
  • 13
0
votes
0 answers

Adding a single legend with very long text to a ggplot2 facet_grid

Using R ggplot2 library, I an generating a facet_grid plot and I want to put a legend off to the right hand side of all the plots -NOT EACH INDIVIDUAL PLOT, but one legend that works for all the plots g = ggplot(pd2, aes(x = p/1000, y=c/1000 )) + …
elbillaf
  • 1,952
  • 10
  • 37
  • 73
0
votes
1 answer

"facet_grid" and overplot: puzzling behaviour

I am plotting some data using facet_grid(), and I noticed something puzzling. I anticipate I am a beginner with ggplot libraries and I might have missed something. Anyhow, here it goes. Assuming the following dataframe: library(ggplot2) d1 <-…
Elendhur
  • 13
  • 4
0
votes
1 answer

facet_grid weird rearrangement of values

I have this plot that I've generated using ggplot2 in R. The code that produces this plot is: plot <- ggplot(mockdata, aes(variable, Measurement)) + geom_tile(aes(fill = mockdata$plotval), colour = "dark red") + facet_grid(~type,…
Sigurgeir
  • 365
  • 2
  • 12
0
votes
0 answers

Seaborn FacetGrid cutting off charts

I have some data I want to visualize in a Seaborn FacetGrid. half_counts = all_counts.loc[all_counts['location_id'] <= 50] g = sns.FacetGrid(half_counts, col="location_id", col_wrap=10) g = g.map(sns.pointplot, "invite_sent_time", "q_i_ratio",…
Huey
  • 2,714
  • 6
  • 28
  • 34
0
votes
0 answers

Remove all the unwanted x axis (labels as well as empty plot space) which dont fall under facet_grid(variables)

I have monthly wise information of NDVI values by COUNTYNAME (35 counties) and by REGIONS (8regions)from 2002 to 2014. Below is the script to plot boxplot (x= COUNTYNAME and y=Dec) and facet_grid by REGIONS and order the boxplot by Median value of…
Mohana
  • 1
  • 2
0
votes
1 answer

Unused argument error in facet_grid for switch

I am drawing bar plots in ggplot2 using facet_grid for class divisions. Can any body tell me why am I getting the error of unusued agrument for switch="x", in an attempt to bring the facet labels at the bottom?: ggplot(d, aes(x=V4,…
0
votes
0 answers

using ggplot/facet_grid to make an ordered barplot

I'm trying to plot my data so that it looks something like this (taken from this blog): My data looks like this: head(Diet) Group Category studies_n studies_pc 1 algae algae 61 38.4 2 algae biofilm 4 …
ayesha
  • 135
  • 15
0
votes
1 answer

two Y-axis for ggplot2 graph with a facet_grid

I'm trying to plot a line and a barchat using ggplot2 package but it's seems to be hard to get two different y-axis when using facet_grid() function... I'd like to add to my current plot a barchart with the Frequency of each product (variable Freq)…
H_el
  • 1
  • 1
  • 3
0
votes
1 answer

facet_grid hierarchical splitting

I can generate 2 big facets with facet_grid based on the factor (a). I can generate one facet for each id + factor combination with facet_wrap or facet_grid (b). I would like to have 3 facets: a(D+E) b(D+E) c(D+E) (c). testd <-…
Ido Tamir
  • 3,017
  • 2
  • 19
  • 28
-1
votes
1 answer

How to set multiple histograms in a FacetGrid

I have a dataframe with 95 columns where are Max(), Min() and Avg() values of different measures, I want to plot their histograms on a FacetGrid of 3 columns and 32 rows where 1st column is max value, 2nd is avg value and 3rd is min value, and the…
-1
votes
1 answer

Plot data using facet-grid in seaborn

I have this dataset table And i want to plot profit made by different sub_category in different region. now i am using this code to make a plot using seaborn sns.barplot(data=sub_category_profit,x="sub_category",y="profit",hue="region") I am…
-1
votes
1 answer

How to make a faceted bar plot

I have a question I'm trying to solve. What is the average claim amount for gender and age categories and suitably represent the above using a facetted bar chart, one facet that represents fraudulent claims and the other for non-fraudulent…
1 2 3
42
43