similar to: qplot (ggplot2) faceting histogram with missing values

Displaying 20 results from an estimated 8000 matches similar to: "qplot (ggplot2) faceting histogram with missing values"

2009 Jun 10
1
ggplot, qplot: alpha channel for colors corresponding to factor
Hi, I have a qplot like the one in the minimal example below, except I also have faceting like this: qplot(jitter(Goodall),jitter(Better.adapt),colour=Second.adapt,facets=~Pol,data=d1) and with the real data I get quite a lot of overplotting, so I would like to add an alpha channel. In addition, I would like to be able to control which colors are used for each value of Second.adapt (which
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 =
2009 Feb 26
1
gplot problems with faceting
Dear R-Listers, I am very confused with what seems to be a misuse of the faceting options with gplot function and I hope you might help me on this. z contains various simulation results from simulations with different set of parameters. I melt my data to have the following data.frame structure : > str(z) 'data.frame': 12383 obs. of 5 variables: $ vID : num 1 2 3 4 5 6 7 8
2009 May 05
2
problem with ggplot2 boxplot, groups and facets
I have a following problem: The call qplot(wg, v.realtime, data=df.best.medians$gv1, colour=sp, geom="boxplot") works nice: for each value of the wg factor I get two box-plots (two levels in the sp factor) in different colours, side-by-side, centered at the wg x-axis. However, I want to separate the data belonging to different levels of the n factor, so I add the facets option:
2008 Mar 25
2
ggplot2 - facetting
Dear All, After having overcome the issue of legends (thanks, Thierry, once more), I am trying to use facetting, but here also I can not find how to do this. I do not want to use qplot, but rather the more flexible options. However, it seems I am doing still something pretty stupid, because I always get an error, even if it seems I am doing everything like the examples. My code is below.
2008 Mar 20
2
I need help integrating ggplot2 into Excel
Dear all I use ggplot2 extensively for my plotting routines and rexcel to have the best of two worlds. (RExcel v 1.75 and R (D)Com v. 2.5) I can run my ggplot functions, such as qplot(...), in scratchpad mode, but not in Macro nor Worksheet functions mode. I have tried the following in Macro mode: Call RInterface.RRun("library(ggplot2)") ... Call
2010 May 21
2
multiple qplot histograms in one plot
Hi, I wish to plot multiple histograms(representing different data so different range along xaxis but y axis is the same) horizontally in ggplot2. I'd like it to look like facets. Is this possible? -- Rajesh.J [[alternative HTML version deleted]]
2011 Mar 25
4
two plots in qplot
Hello I simply want to plot two variables against one 'year' variable in qplot. Is any way of doing this without reshaping data in long format and using facet function afterwards? Thank you Denis
2010 Feb 03
2
ggplot2/qplot question regarding reducing the no. of x-axis labels
All: I am using the command: qplot(date,MAE,data=data,facets=INTERVAL~type) which works fine except that the dates for my date axes are crunched together so much that they are unreadable. I can not find an option that I can set that will automatically reduce the x-axis labels to fit the available space. regards to all? -- Thomas E Adams National Weather Service Ohio River Forecast Center
2008 Jul 10
1
layout is to xyplot as ??? is to qplot
Playing with ggplot, something I'd promised myself I'd get around to. I've the following scenario: library(lattice) library(ggplot2) myData <- data.frame( x = rnorm(100), y = rnorm(100), group = 1:4 ) xyplot(y ~ x | factor(group), data = myData, layout = c(2, 2)) qplot(x, y, facets = ~ group, data = myData) In this code the lattice example gives me a 2x2 layout, whereas
2008 Jun 17
1
ggplot facet spacing, wrapping
I'm running 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) +
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 the average of x
2009 Oct 06
1
ggplot2 applying a function based on facet
Look at the bottom of the message for my question #here is a little function that I wrote USGS <- function(input="discharge", days=7){ library(chron) library(gsubfn) #021973269 is the Waynesboro Gauge on the Savannah River Proper (SRS) #02102908 is the Flat Creek Gauge (ftbrfcms) #02133500 is the Drowning Creek (ftbrbmcm) #02341800 is the Upatoi Creek Near Columbus (ftbn) #02342500 is
2011 May 18
1
Changing order of facet grid in ggplot2
Hi I am running the following code: sym <- c(sym1,sym2,sym4) lifedxm <- c("O-BD","O-WELL","O-UNI") life <- c(lifedxm,lifedxm,lifedxm) tp <- c("TP-ANY","TP-ANY", "TP-ANY", "TP-SUB", "TP-SUB", "TP-SUB", "TP-CLIN" , "TP-CLIN", "TP-CLIN") data <-
2012 Jun 27
3
qplot and colors (Please Help)
Please help: I am using qplot as below and want to specify a different color scheme for race but dont know how, can someone show me. Thanks in advance Code and input file below: library(ggplot2) library(gridExtra) d<-read.table("results", header=TRUE, fill=TRUE) plot2<-qplot(X,Y,data=d,color=race,facets=TYPE~., xlab="X", ylab="Y") + theme_bw()
2008 Oct 13
1
ggplot faceting like lattice | variable
I would like to be able to do the xyplot in ggplot below. I read in the archive that Hadley was working on this for the next release, and I can not find the documentation (Aug. 23rd). River.Mile <- c(215 ,202, 198, 190, 185, 179, 148, 119, 61) Cu <- rnorm(9) Fe <- rnorm(9) Mg <- rnorm(9) Ti <- rnorm(9) Ir <- rnorm(9) r <- data.frame(River.Mile, Cu, Fe, Mg, Ti, Ir) z <-
2008 May 12
1
Converting qqplot2 qplot() to grammar?
Hello all, I've been using the following qplot command: qplot(pixX,pixY, data=som, geom="tile", fill=rgb) + scale_fill_identity() + opts(aspect.ratio = .75) + facet_grid(unitX ~ unitY) Now I would like to convert it into the explicit ggplot grammar, so I can remove the extras: axes, labels, background, borders, facet labels, and extra white-space around the plot. (If anyone has
2010 Aug 23
2
change order of plot panels in faceted ggplot/qplot
Hi, I have a 5-paneled figure that i made using the facet function in qplot (ggplot). I've managed to arrange the panels into two rows/ three columns, but for the sake of easy visual comparisons between panels in my particular dataset, I want to have the two plots on the bottom align on the right hand side of the figure instead of the left. Here's an example: m <-
2007 Jul 16
2
Different axis limits for each facet in ggplot2
Hi! 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" )
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 = "free_y") does not