similar to: legend title in qplot

Displaying 20 results from an estimated 6000 matches similar to: "legend title in qplot"

2009 Jan 30
1
Using ggplot2 I need to move the location of legend to on the plot
  Thanks again for the hints about adding the vertical line to the hist plot and in ggplot.  That worked great.    Based on that advice I've been flipping through the ggplot2 doc and ggplot-static\index.html webpage more looking for the answer to the next question.    Unfortunately, I haven't stumbled on a description of how to move around the location of the legend.    Here is what I
2009 Jul 13
1
Strange error in qplot
Hi all, whenever I try to plot a histogram using qplot() function of "ggplot2" library, I get error like this : > qplot(rnorm(1000), geom="histogram", binwidth=0.2, main = "", xlab="", > ylab="") Error in scale[[1]] : subscript out of bounds However if I remove ylab="" argument, then it is working fine. Am I missing something?
2009 Mar 02
3
ways to put multiple graphs on single page (using ggplot2)
Hi, Here are three plots: library(ggplot2) data(diamonds) randind <- sample(nrow(diamonds),1000,replace=FALSE) dsmall <- diamonds[randind,] qplot(carat, data=dsmall, geom="histogram",binwidth=1) qplot(carat, data=dsmall, geom="histogram",binwidth=.1) qplot(carat, data=dsmall, geom="histogram",binwidth=.01) What are ways to put these three plots on a single
2009 Jan 29
2
Adding vertical line to histogram and qplot "stacked" plot
R-users it appears I am leaning on your knowledge once again.  Is there any way to add a vertical line to a histogram and qplot "stacked" plot?  Here is my current attempt:   "qplot" approach attempt: qplot(Run, data = data_dataframe, breaks = breaks, fill = Temperature, main = short_title) + scale_x_continuous("Data") + scale_y_continuous("Freq")
2010 Jun 30
2
ggplot qplot bar removing bars when truncating scale
I'm having problems with this example, it is posted with reproduceable code below, both with the normal 0-6 scale and the desired 3-6 scale (with bars removed). How can I get the graph to have the desired 3-6 scale without removing the bars. Thanks! #Data
2009 Jan 28
1
Changing histogram stack in qplot
I've been using qplot pretty successfully to generate stacked histograms.  However, it appears that I need to tweak the colors a little.    I've got three temperature variables (characters not numeric) and I need to change from the default qplot colors to the following: Low = Blue Middle = black High = Red   Here is pseudo code of what I have currently:qplot(Run, data = TestData, breaks =
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]]
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 Jul 29
2
ggplot2 histograms... a subtle error found
Hello all, I have a peculiar and particular bug that I stumbled across with ggplot2. I cannot seem to replicate it with anything other than my specific data set. Here is the problem: - when I try to plot a histogram, allowing for ggplot2 to decide the binwidths itself, I get the following error: - stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to
2009 Apr 16
3
segment between points on different plots
Hi, I need to draw a line segment between two points on different plots in the same multigraph.I've tried looking at the zoominplot function in plotrix but havent understood much.any help is appreciated ~Aks [[alternative HTML version deleted]]
2011 Jul 25
4
ggplot question: changing the label for the Y axis on a histogram
Some help with how to re-label the vertical axis in a histogram would be appreciated. qplot(off.sc,weight=rel.freq,binwidth=.29,main="test Figure"+ylab("New from inside"))+ylab("New from outside")+ xlab("off.sc\nAggregated frequency plots for 17 equal intervals.") The code
2010 Nov 30
2
ggplot2 histograms
Hi With ggplot2 I can very easily create beautiful histograms but I would like to put two histograms on the same plot. The histograms may be over-lapping. When they are overlapping the bars are shown on top of each other (so that the overall height is the sum of the two). Is there any way to get them to display overlapping (with smaller value in front, larger value behind) so that the overall
2009 Oct 14
1
change order of bar plot categories
Is this what you want? temp<-c(rep("Low",2),rep("Medium",2),rep("High",2)) light<-rep(c("Dark","light"),3) avg<-dat.avg2[,3] # se<-dat.avg2[,4] dat.avg.temp<-data.frame(cbind(avg,se)) dat.avg.temp<-data.frame(cbind(temp,light,dat.avg.temp)) dat.plot<-qplot(light,avg, fill=factor(temp),data=dat.avg.temp, geom="bar",
2011 Jun 07
1
ggplot2 Histogram with density curve
I am learning ggplot2 commands and I have figured out how to create histograms and density curves but I am not sure how to add a density curve on top of a histogram. Here are the two graphs that I created. ## Histogram t<-rnorm(500) w<-qplot(t, main="Normal Random Sample", fill=I("blue"), colour=I("black"), geom="histogram") w ##Density Curve
2008 Dec 24
1
ggplot2's qplot() not rendering title descender
On my machine (Mac OS 10.5.6, R 2.8.1) the following plot is drawn such that a substantial portion of the descender of the title is covered by the plot: library(ggplot2) qplot(x=1:10,y=1:10,main='p q j g') -- Mike Lawrence Graduate Student Department of Psychology Dalhousie University www.thatmike.com Looking to arrange a meeting? Do so at: http://www.timetomeet.info/with/mike/ ~
2008 Jul 03
1
ggplot2 legend for vertical lines
Dear all, The following example code produces a graph with ggplot2, to which I add several vertical lines of arbitrary colors. I am not satisfied with the legend: it automatically adds some vertical lines which I'd rather not see (they confuse the reader rather than add information in this case). > library(ggplot2) > dfr <- data.frame(values = sin(1:50/10), > fact =
2009 Jan 03
2
R Stacked Histogram
I've seen this asked, but never fully answered.  Is it possible to plot stacked histograms in R? I have four data sets that I would like to show combined vertically in histogram format.  Is this possible?  Thank you for any feedback you can provide. P.S. I know I can show the four sets side by side, but I want to combine them, but still uniquely identify each.   Thanks again.
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 Aug 19
2
ggplot2 legend problem
I'm trying to overlay two histograms using transparency to enable viewing of multiple distributions on a single scale. So far ggplot2 seems to do what I want. However I'm having a problem generating the legend coloring appropriate to each distribution in the plot. Here is a test case to show my best (failed) effort so far: library(ggplot2) x <- data.frame(X=rnorm(1000, mean=0)) y
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