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
10
votes
1 answer

Indexing Fields with SOLR and LowerCaseFilterFactory

I have a Field defined as
RyanFetz
  • 525
  • 2
  • 8
  • 25
10
votes
4 answers

Elasticsearch average over date histogram buckets

I've got a bunch of documents indexed in ElasticSearch, and I need to get the following data: For each month, get the average number of documents per working day of the month (or if impossible, use 20 days as the default). I already aggregated my…
Thibault J
  • 4,336
  • 33
  • 44
10
votes
2 answers

ggplot2: Using gtable to move strip labels to top of panel for facet_grid

I am creating a graphic using facet_grid to facet a categorical variable on the y-axis. I decided not to use facet_wrap because I need space = 'free' and labeller = label_parsed. My labels are long and I have a legend on the right so I would like to…
Tom Harrop
  • 678
  • 2
  • 7
  • 23
10
votes
1 answer

How to use empty space produced by facet_wrap?

I have a faceted plot that forms an n x m grid. By design, the last (bottom-right) cell is always empty, so I'd like to utilize the extra space by adding another ggplot object. My current solution relies on low-level viewport approach, which is not…
tonytonov
  • 25,060
  • 16
  • 82
  • 98
9
votes
2 answers

Solr facet counts with selective exclude

I'm not sure if this is possible, but I'd like to be able to control the counts returned for facets more closely than just include and exclude. Specifically, I have an interface that allows users to filter by 'facetA' and 'facetB'. It looks a little…
Dave
  • 1,204
  • 2
  • 14
  • 25
9
votes
1 answer

Why is std::codecvt only used by file I/O streams?

I've been implementing a codecvt for handling indentiation of output streams. It can be used like this and works fine: std::cout << indenter::push << "im indentet" << indenter::pop << "\n im not..." However, while I can imbue an std::codecvt to any…
user3520616
  • 60
  • 3
  • 17
9
votes
4 answers

Eclipse and Facets

In the courses java, everyone (or at least most people) seemed to have a working eclipse. They always seemed to have a working faces-config (a visual one), and autocomplete in xhtml files (for facelets). Though for autocomplete, we added *.xhtml…
toomuchcs
  • 1,344
  • 8
  • 20
  • 25
9
votes
1 answer

Variable hline in ggplot with facet

Using the Iris data set as an example, I can produce a ggplot with facet. The code…
Nicholaev
  • 91
  • 1
  • 3
9
votes
3 answers

how to set limits on rounded facet wrap y axis?

I have this plot and I need to round the y axis so what appears is acceptable EXCEPT for the fact that I would like to not just show 1 value on the y axis. I'd like to add the "limit" to the "scale_y_continuous" function so that the limits for each…
user3022875
  • 8,598
  • 26
  • 103
  • 167
9
votes
1 answer

ggplot2: add regression equations and R2 and adjust their positions on plot

Using df and the code below library(dplyr) library(ggplot2) library(devtools) df <- diamonds %>% dplyr::filter(cut%in%c("Fair","Ideal")) %>% dplyr::filter(clarity%in%c("I1" , "SI2" , "SI1" , "VS2" , "VS1", "VVS2")) %>% …
shiny
  • 3,380
  • 9
  • 42
  • 79
9
votes
2 answers

R ggplot - adding all data points to all facets

until now I can't find an appropriate answer, here is my short question about ggplot2 in R: data(mtcars) ggplot(data=mtcars, aes(x=mpg, y=wt, fill=factor(cyl))) + scale_fill_manual(values=c("red","orange","blue"))+ geom_point(size=2,…
mod_che
  • 137
  • 1
  • 6
9
votes
2 answers

ggplot2 and first data point in a line

I am creating two plots using ggplot2 and then using grid.arrange to merge them together. I should say that both of the plots are also using facet_grid for a visual tweaking. My problem is that the bottom plot, which is really a data table, ends up…
vashts85
  • 1,069
  • 3
  • 14
  • 28
9
votes
1 answer

Change y axis limits for each row of a facet plot in ggplot2

I have a 3 rows by 5 columns facet plot. Each row show data which spread over different ranges. To properly display my data so everything is shown, I don't set a y axis limit. Here's my…
Lucien S.
  • 5,123
  • 10
  • 52
  • 88
9
votes
1 answer

ggplot2: How to get merge functionality of facet_grid()'s labeller=label_both and facet_wrap()'s ncol options?

I am creating a boxplot using ggplot2. I am able to create the boxplot successfully but I am having problems when merging two features with faceting in ggplot2: When faceting, strip text should contain column name & column value (as given by…
Komal Rathi
  • 4,164
  • 13
  • 60
  • 98
9
votes
1 answer

Add a segment only to one facet using ggplot2

As an example, I have this data frame, called my_data: Groups FactorA FactorB FactorC N value sd se ci 1 Control Condition1 Condition1 Condition1 3 92.00000 6.0827625 3.511885 15.110420 2 …
this.is.not.a.nick
  • 2,631
  • 3
  • 21
  • 26