similar to: Problems with boxplot in ggplot2:qplot

Displaying 20 results from an estimated 5000 matches similar to: "Problems with boxplot in ggplot2:qplot"

2008 Jan 11
1
ggplot2, coord_equal and aspect ratio
Hi everyone, Hi Hadley, I am a heavy user of coord_equal() in ggplot2 since most of my data is spatial, on x,y coordinates. Everything works. However by enforcing an aspect ratio of 1 for the plotting region, coord_equal() usually wastes a lot of space if the region of interest is not a perfect square. For example: x=runif(10) a=data.frame(x=x*3,y=x) ggplot(data=a, aes(x=x,y=y)) +
2010 Apr 07
1
ggplot2, density barplot and geom_point layer
Hi, Please consider the example below. How can I manage to overlay the points the way I want in the second case? Thanks, Joh library(ggplot2) # Modify data to match "real" case myDiamonds <- diamonds myDiamonds[["clarity"]] <- as.character(myDiamonds[["clarity"]]) myDiamonds[myDiamonds[["clarity"]]=="I1","clarity"] <- 1
2007 Sep 20
1
ggplot and xlim/ylim
Hello everyone, I am (happily) using ggplot2 for all my plotting now and I wondered is there is an easy way to specify xlim and ylim somewhere when using the ggplot syntax, as opposed to the qplot syntax. Eg. qplot(data=mtcars,y=wt, x=qsec,xlim=c(0,30)) <-> ggplot(mtcars, aes(y=wt, x=qsec)) + geom_point() + ??? Indeed the ggplot syntax is in general more flexible and powerful and
2007 Aug 02
1
ggplot2 qplot and add
Hi there, I have some simple frequencies I want to plot into one graph. I had it working, and now I can't figure out whats going wrong. All the data is stored in a dataframe, and i finally managed to order the factor correctly! Each column is a variable and contains integers for the same set of values in the column that contains the headers for each row (graphLabels). So, I get the data
2012 Sep 14
1
Adding annotations to qplot from a data frame
I have the following data frame: > algaedata = year DIV cellsperml 2001 BAC 72.808 2001 CHL 3.273 2002 BAC 14.002 2002 CYA 220.896 2002 UNI 464.699 2003 BAP 0 2003 BAC 1.782 2004 CYA 315.799 2005 UNI 222.532 2005 BAP 0.2 2005 CYA 163.627 2005 BAC 324.949 2006 CHL 1.636 2006 BAC 199.145 2007 CHL 19.635 2007 CYA 134.174 2007 BAC 485.405 2007 CHL 11.454 2007 CYA 104.721 ...which makes a fine
2010 Aug 26
1
ggplot inside cycle
Dear all I want to save several ggplots in one pdf document. I tried this for (i in names(iris)[2:4]) { p<-ggplot(iris, aes(x=Sepal.Length, y=iris[,i], colour=Species)) p+geom_point(aes(size=3)) } with different variations of y input but was not successful. In past I used qplot in similar fashion which worked for(i in names(mleti)[7:15]) print(qplot(sito, mleti1[,i], facets=~typ,ylab=i,
2007 Nov 13
1
ggplot2: changing axis labels in ggplot()
Hi all, For various reasons, I need to use ggplot instead of qplot for a complex figure. Everything is working fine, except I cannot figure out how to rename the axis labels in ggplot. I have pasted a simple example below. Any ideas on what I am doing wrong? Thanks for your help. James library(ggplot2) ##create data
2011 Feb 11
1
Time Series in R with ggplot2
Hi Folks, First, the important information. > sessionInfo() R version 2.12.1 (2010-12-16) Platform: i386-pc-mingw32/i386 (32-bit) Second, my problem. I have a series of data sets comprised in the following format. > totsoc Location Year Value 1 SOUTH 1998 29 2 SOUTH 1999 20 3 SOUTH 2000 32 4 SOUTH 2001 29 5 SOUTH 2002 25 6 SOUTH 2003 28 7
2011 Jul 07
1
Confidence bands in ggplot2
Hi, I have the following data: > est sch190 sch107 sch290 sch256 sch287 sch130 sch139 4.16656026 2.64306071 4.22579866 6.12024789 4.49624748 11.12799127 1.17353917 sch140 sch282 sch161 sch193 sch156 sch288 sch352 3.48197696 -0.29659410 -1.99194986 10.23489859 7.77342138 6.77624539 9.66795001 sch368
2008 Apr 04
0
ggplot2 - version 0.6
ggplot2 ------------------------------------------------------------ ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (like drawing legends) as well as providing a powerful model of graphics that makes it easy to produce
2008 Apr 04
0
ggplot2 - version 0.6
ggplot2 ------------------------------------------------------------ ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (like drawing legends) as well as providing a powerful model of graphics that makes it easy to produce
2011 May 26
1
Question about ggplot2
Hi all, Is there any way for me to to string in the argument of qplot or ggplot? for example qplot(x='carat',y='price',data=diamonds,geom=c('point','smooth')) instead of qplot(x=carat,y=price,data=diamonds,geom=c('point','smooth')) Thanks!! Regards, TszKin Julian [[alternative HTML version deleted]]
2010 Mar 31
1
ggplot2: Adding points to a density plot
Hi, Consider something like > library(ggplot2) > movies$decade <- round_any(movies$year, 10) > m <- qplot(rating,data=movies,colour=factor(decade),geom="density") > m (modified from "?stat_density"). I'd like to add on the line y=0 a dot for the median of each "decade" category (using the same colour coding as the "fill"). I'm
2008 Oct 21
1
GGPLOT/QPLOT Boxplot with summary
I'd like to generate a boxplot that has BOTH the overall distribution of a continuous variable (say age), and then a boxplot for each level of a stratifying variable (e.g. site). Does anyone have prototype code for this? Thanks, -- View this message in context: http://www.nabble.com/GGPLOT-QPLOT-Boxplot-with-summary-tp20095591p20095591.html Sent from the R help mailing list archive at
2010 Aug 04
2
ggplot2 barplot: extra markers in graph
Dear List, (self-contained example + version info at the bottom) I'm having trouble producing a barplot using the functions in ggplot2. When I use the position="dodge" option, the bars are plotted but also a number of spurious markers. More specifically, a number of black dots are plotted in the graph that should not be there. This behaviour is not seen when calling the same
2008 Feb 21
2
jpeg() creating empty files with qplot() in a loop
Hello all, I'm stuck with a strange issue with writing jpegs of plots to a folder in a loop. This works: for (step in 1:length(steps)) { jpeg(filename=paste("frame_",sprintf("%05d",step),".jpg",sep="")) plot(steps[[step]]) dev.off() } But if I use qplot to generate the plot (which is my aim): for (step in 1:length(steps)) {
2009 Mar 12
3
Unable to run smoother in qplot() or ggplot() - complains about knots
I get the following error when I run qplot() qplot(grade, read,data = hhm.long.m, geom = c("point", "smooth")) Error in smooth.construct.cr.smooth.spec(object, data, knots) : x has insufficient unique values to support 10 knots: reduce k. I am not sure how to tackle this problem. When I take a subsample (< 1000) than I am able to run that function but with my sample
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
2011 Nov 16
1
boxplot strange behavior
Hello, I generate box plots from my data like this: qplot(x=xxx,y=column,data=data,geom="boxplot") + xlab("xxx") + ylab(ylabel) + theme_bw() + scale_y_log10() + geom_jitter(alpha=I(1/10)) The problem is that I see lot of points above the maximum at the same level as some outliers. It looks very weird as I expected the outliers to be "few" and specially not see any
2008 Mar 04
1
qplot (ggplot2) faceting histogram with missing values
Hi, I've run into a difficulty with qplot function (in the ggplot2 package). I can facet 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 =