search for: facets

Displaying 20 results from an estimated 403 matches for "facets".

Did you mean: faces
2007 Oct 21
8
Interesting shared behaviour side-effect
Given the following ApplicationController specs: describe ApplicationController, "one facet", :shared => true do it ''foo'' ... it ''bar'' ... end describe ApplicationController, "some other facet", :shared => true do it ''abc'' ... it ''xyz'' ... end describe
2007 Oct 30
1
Facets and/or Nested Describes
I have to confess that I did not know about facets before reading Ashley Moran''s post: http://aviewfromafar.net/2007/10/21/quick-and-dirty-facets-in-rspec-trunk Not knowing about the facets solution, I made a couple of feature requests for nested describes: http://rubyforge.org/tracker/index.php?func=detail&aid=14980&group_id=797&...
2008 Jun 17
1
ggplot facet spacing, wrapping
...into some problems with the spacing of some faceted ggplot plots. I have a number of time series faceted to be one above another, but the scale labels of the y axes all clobber each other at the bottom/top of each. for example, try: qplot(x, y, data = data.frame(x = 1:10, y = 1:10, size = 1:10), facets = size ~ ., size = size) + scale_x_continuous(breaks = 1:10) + scale_y_continuous(limits = c(0,10)) and notice the 10's and the 0's on the respective Y axes are mushing each other. Is there a way to adjust the spacing of facets in a faceted plot? Likewise, what about wrapping, so that...
2013 Oct 12
2
Order of factors with facets in ggplot2
Hello, I'd like to produce a ggplot where the order of factors within facets is based on the average of another variable. Here's a reproducible example. My problem is that the factors are ordered similarly in both facets. I would like to have, within each facet of `f1', boxplots for 'x' within each factor `f2', where the boxplots are ordered based on t...
2007 Jun 27
6
Aspects in RSpec 1.0.5
Forgot post this when I did it... For anyone else that used the "aspect" method of the rspec-ext gem, here''s a New World version of the code to drop into spec_helper.rb. (I''m assuming rspec-ext hasn''t been updated since I did this a week or two ago) module Spec module DSL module BehaviourEval module ModuleMethods def
2011 Feb 16
1
Faceting article
Hi, I've been involved in developing a fairly complex site at http://tilt.ft.com recently, and have acquired an unhealthy interest in faceting. I couldn't find any good non-academic guides to faceting strategy on the web, so I thought I'd have a stab at writing one. I'm not completely happy with it, but it's been sitting in my drafts for long enough that I thought it
2010 Sep 11
1
Setting scales for ggplot2 with facets
Faceting in ggplot2 seems to permit different scales for different facets, but I fail to see how one could control ylim and xlim ranges for each facet separately. For instance, I would like to set the ylim = c(0,10) for facet "A" and ylim = c(42,102) for facet "B". Since the data is out of these ranges, setting facet_grid(factor ~ ., scales = &qu...
2008 Mar 04
1
qplot (ggplot2) faceting histogram with missing values
...cet histograms even when the faceting variable contains missing values, but only so long as the faceting variable is not a factor. Example: y1 <- rnorm(10) x1 <- c(rep(1,5), rep(2,4), NA) x2 <- factor(c(rep(1,5), rep(2,4), NA)) library(ggplot2) qplot(y1, geom = "histogram", facets = x1 ~.)# this works qplot(y1, geom = "histogram", facets = x2 ~.)# this doesn't work Error in if (is.null(data) || nrow(data) == 0) return() : missing value where TRUE/FALSE needed This is with ggplot2_0.5.7, R version 2.6.2, on OS X 10.5.2. Not that this is terribly hard to wor...
2008 Feb 27
1
how to specify ggplot2 facet plot order
Hi, new to R and ggplot2. I've been trying to get a facet plot in which the order of the facets is as I require, rather than ordered numerically, alphabetically, by Roman numerals, mean (answers to these were posted here after much searching). Here's some test code to demonstrate what I get. series = c('C2','C4','C8','C10','C15','C20') ids...
2008 Mar 25
2
ggplot2 - facetting
..., 'Class4')))) plotdata2 <- plotdata2[order(plotdata2[,'group']),] plot0<-ggplot() layer1<-layer(data=plotdata2, mapping=aes_string(x='x',y='y'),geom='point', stat='identity') scaleY<-scale_y_continuous() scaleX <- scale_x_continuous() Facets<-facet_grid(group ~ .) plot1<-plot0+layer1 +scaleY + scaleX + facet_grid(group~.) plot1 I always get the error message: Error in check_formula(formula, varnames) : Formula contains variables not in list of known variables Thanks for any help you can provide. Best, Pedro
2011 Oct 11
1
controling text in facets (ggplot2)
Hi R-helpers! Here is my problem: I have a graph with 3 different facets where there are 3 different regression line. My goal is to mention separately in each facet each equation that describes my lines. So far, I managed to add a line and the same equation to all my facets but that's not unfortunately what I want. Is there a way to do that? Any suggestion would b...
2011 Jun 11
0
problems with geom_vline, histograms, scale=free and facets in ggplot
Dear list, I?m having a little trouble with adding vertical lines to a histogram. I need to draw a matrix of histograms (using facets), and in each histogram add a vertical line indicating the mean value of the data in each facet. According to the last example in the geom_hline help, to display different lines in each facet I need to provide a data frame. I modified this example to make a plot similar to what I need: # BEGIN R...
2013 Mar 07
3
ggpliot2: reordering of factors in facets facet.grid(). Reordering of factor on x-axis no problem.
...ch = 20)), var2 = rnorm(120, mean = rep(c(6, 7, 8), each = 40), sd = rep(c(1, 2, 3), each = 20))) # Trying to change the order of my factor1 (same method works for factor3, # which is on th x-axis). Factor1 (A-F) is represented on the different facets # and the factor1 labels can be read off the strips: mydata$factor1 <- factor(mydata$factor1, levels=c("F", "E", "C", "D", "A", "B"), order=T) # summarizing the data with factor1 and fact...
2009 Nov 22
1
"Over-coloring" facets on persp() plot
...eful graphs of my research data using persp(). I have even figured out how to overplot rectangular regions (corresponding to submatrices) with a different color. This is accomplished by using par(new=T). I am now searching for a way to "highlight" a set of (possibly non-contiguous) facets with a specific color, e.g., the facet between each set of four points whose values are all above a certain threshold. An example would be coloring the raised corners of the classic sombrero (found in example(persp)) differently from the rest of the sombrero. I feel like the last example in...
2010 Nov 09
1
ggplot2: facet_grid with different vertical lines on each facet
Hello, I am plotting many histograms together using facet_grid in ggplot2. However, I want to then add a vertical line to each histogram, or facet, each of which vertical lines are at different x-values. The following example adds all vertical lines to each facet: ggplot(data,aes(values)) + geom_histogram() + facet_grid(.~variable) + geom_vline(xintercept=c(5,10,15)) How can I add a vertical
2008 Aug 24
5
uninitialized constant "Console"
I just upgraded webgen, and it broke. Here''s what I get when I run webgen: chadmac:thewoolleyweb.com woolley$ webgen --version An error has occurred: uninitialized constant Console chadmac:thewoolleyweb.com woolley$ gem list webgen *** LOCAL GEMS *** webgen (0.5.2, 0.4.7)
2009 Feb 11
2
Label bars in a faceted bar plot in ggplot2
Hi List, I am running R 2.8.0 on a Windows XP machine, running ggplot2 version 0.8.1 I want to label the bars in a faceted grid barplot. Reproducible R code is given below: #### reproducible facet barplot ##### library(ggplot2) # Dataset from which to create the barplot ml <- rep(1:10,2) vals <- rnorm(20,mean = 10, sd=1) type <- c(rep("MAPE",10),rep("AIC",10))
2007 Jul 16
2
Different axis limits for each facet in ggplot2
...! Is it possible to have different axis limit for each facet in a ggplot2 plot? Here is an example: -------------------------------------------------------------- library(ggplot2) x=seq(-10,10,.1) y=cos(x) z=sin(x)*10 dat=melt(data.frame(x,y,z), id.var="x") qplot( x, value, data=dat, facets=variable~., geom="line" ) -------------------------------------------------------------- Both the x and y axes are now the same for both facets. But since the ranges of the 'y' and the 'z' variable differ so much, I would prefer their y axes to be different. This is easy...
2006 Aug 02
4
ggplot facet label font size
How do I change the font size in the facet labels along the edges of the plot? For example (from the ggplot help file): p<-ggplot(tips, sex ~ smoker, aesthetics=list(x=tip/total_bill)) gghistogram(p) In this plot, the facet labels are "smoker: No", "smoker: Yes", "sex: Female", "sex: Male". What command can I use to reduce the font size of
2009 Feb 26
1
gplot problems with faceting
...subset z based on a single variable name eg ".ASU_1.Biofilm_C" Then I try the following, but I get an error message : > qp<- qplot(Par.Value, Var.Value, data = z[z$Var==v,], ylab=v, geom=c("point","smooth"), method="lm") > qp<- qp + facet_wrap( facets= Par~ ., scales = "free_x", ncol=length(vPar)) > qp Erreur dans `[.data.frame`(plot$data, , setdiff(cond, names(df)), drop = FALSE) : colonnes non d?finies s?lectionn?es I can have this working by modifying the facets arguments to "Par~Var", and it does what I want, But...