Questions tagged [facet]

Facetting is a technique for data visualization which makes it easier to compare groups inside your data.

Facet

In the ggplot2 package for R, creating subplots for groups of data is called facetting. When visualizing data, facetting allows groups of data to be rendered alongside each other in order to make it easier to compare them. A facetted plot can be made with facet_wrap() and facet_grid().

Resources

1763 questions
39
votes
3 answers

No Android facet found, issues compiling with Android Studio 0.2

So, following the advice on this SO post (sorry, I would comment there expect I don't have enough reputation) Gradle: FAILURE: Could not determine which tasks to execute I removed the tags from my .iml files, which allows me to compile. But when I…
Bradley Bossard
  • 2,439
  • 2
  • 23
  • 30
34
votes
5 answers

Place a legend for each facet_wrap grid in ggplot2

I have this data frame: x <- data.frame( Date = factor(rep( c("12/1/2011", "1/2/2012", "2/1/2012", "2/10/2012", "2/13/2012"), 3 )), Server = factor(rep(c("A", "B", "C"), each = 5L)), FileSystem = factor(c( "/", "/var", "tmp",…
user1471980
  • 10,127
  • 48
  • 136
  • 235
33
votes
7 answers

Getting "Project facet Java version 1.8 is not supported." in Eclipse Luna

I am using up-to-date Eclipse Luna which should be ready for Java 8. However when I choose to create a new server with Tomcat 7 and click Next, in the Add and Remove screen I can't move my project because "Project facet Java version 1.8 is not…
Orin
  • 419
  • 1
  • 5
  • 10
30
votes
4 answers

How to adjust facet size manually

I have a faceted plot with very diverse data. So some facets have only 1 x value, but some others have 13 x values. I know there is the parameter space='free' which adjusts the width of each facet by the data it represents. My question, is there a…
drmariod
  • 11,106
  • 16
  • 64
  • 110
26
votes
2 answers

Elasticsearch - generic facets structure - calculating aggregations combined with filters

In a new project of ours, we were inspired by this article http://project-a.github.io/on-site-search-design-patterns-for-e-commerce/#generic-faceted-search for doing our “facet” structure. And while I have got it working to the extent the article…
Reonekot
  • 402
  • 4
  • 10
26
votes
1 answer

Getting rid of facet_grid labels on those gray boxes?

What I'd like it's to remove those labels on the right side, the ones on gray boxes on the side. I'll give an example: p <- ggplot(mtcars, aes(mpg, wt, col=factor(cyl))) + geom_point() p + facet_grid(cyl ~ .) Thanks in advance! Juan
Juan
  • 1,351
  • 1
  • 14
  • 28
26
votes
2 answers

How to create a faceted line-graph using ggplot?

I have a data frame created with this code: require(reshape2) foo <- data.frame( abs( cbind(rnorm(3),rnorm(3, mean=.8),rnorm(3, mean=.9),rnorm(3, mean=1)))) qux <- data.frame( abs( cbind(rnorm(3),rnorm(3, mean=.3),rnorm(3, mean=.4),rnorm(1,…
neversaint
  • 60,904
  • 137
  • 310
  • 477
26
votes
1 answer

Varying axis labels formatter per facet in ggplot/R

I have a dataframe capturing several measures over time that I would like to visualize a 3x1 facet. However, each measure contains different units/scales that would benefit from custom transformations and labeling schemes. So, my question is: If the…
Stefan Novak
  • 763
  • 1
  • 6
  • 13
25
votes
6 answers

multiple column/row facet wrap in altair

In ggplot2, it's easy to create a faceted plot with facets that span both rows and columns. Is there a "slick" way to do this in altair? facet documentation It's possible to have facets plot in a single column, import altair as alt from…
saladi
  • 3,103
  • 6
  • 36
  • 61
23
votes
2 answers

set axis limits on individual facets of seaborn facetgrid

I'm trying to set the x-axis limits to different values for each facet a Seaborn facetgrid distplot. I understand that I can get access to all the axes within the subplots through g.axes, so I've tried to iterate over them and set the xlim with: g…
Constantino
  • 2,243
  • 2
  • 24
  • 41
23
votes
1 answer

R + ggplot2 => add labels on facet pie chart

I want to add data labels on faceted pie char. Maybe someone can can help me. My data: year <- c(1,2,1,2,1,2) prod <- c(1,1,2,2,3,3) quantity <- c(33,50,33,25,34,25) df <- data.frame(year, prod, quantity) rm(year, prod,…
AndriusZ
  • 822
  • 1
  • 10
  • 18
22
votes
2 answers

facet_wrap add geom_hline

I have the following code for my ggplot - the facet_wrap function draws out 20 plots on the page for each Name and there are 5 Pcode along the x-axis. I would like to calculate the average TE.Contr for each Name and plot that value as a horizontal…
user8491385
  • 413
  • 1
  • 5
  • 17
22
votes
3 answers

ggplot2: Put multi-variable facet_wrap labels on one line

I am using facet_wrap to split my scatter plot as facet_wrap(x~y+z) This generates 22 plots in my case as desired. However, label for each of those 22 plots is displayed in 3 rows (x, y and z) which unnecessarily consumes the space in the window…
beeprogrammer
  • 581
  • 1
  • 7
  • 18
22
votes
4 answers

set "space" in facet_wrap like in facet_grid

I need different-width facets; the left plot shows the dynamic range of an experiment, and the right has the test conditions. Is there a way to have both free x and y scales with facet_wrap? It is possible in facet_grid, but even with…
NWaters
  • 1,163
  • 1
  • 15
  • 27
21
votes
5 answers

Count distinct values using elasticsearch

I am learning elastic search and would like to count distinct values. So far I can count values but not distinct. Here is the sample data: curl http://localhost:9200/store/item/ -XPOST -d '{ "RestaurantId": 2, "RestaurantName": "Restaurant…
Developer
  • 817
  • 2
  • 16
  • 28