similar to: multiple qplot histograms in one plot

Displaying 20 results from an estimated 5000 matches similar to: "multiple qplot histograms in one plot"

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 May 19
2
Histograms without bars
Hello I'd like to plot a histogram of some data composed of real numbers. The bin width I'm using is ~ 0.01, which results in high values in the y axis, so that the area under each bar corresponds to the probability of the data in that range. Is is possible to plot points whose y coordinate correspond to that probability, instead of plotting the histogram bars? In other words, instead of
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 Sep 06
5
ggplot2::qplot() -- arbitary transformations of coordinate system?
Hi, Does anyone know how to do a coord_trans() in which the y-axis is tranformed into (for example) -1000/y? Thanks, _____________________________ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400 Charlottesville, VA 22904-4400 Parcels: Room 102 Gilmer Hall McCormick Road Charlottesville, VA 22903 Office: B011
2011 Jan 14
2
bug in qplot (library ggplot2)
Hello, this following code give a nice png: /library(ggplot2) i <- 1 png(file=paste('test ',i,'.png',sep='')) qplot(carat, data=diamonds, fill=color,geom='histogram')+scale_y_continuous(i) dev.off() / I would like to get more files, but the following code doesn't make any file: /library(ggplot2) for (i in 1:2) { png(file=paste('test
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 =
2008 Oct 28
1
does qplot works with Sweave?
Hi Hadley: I'm practicing writing a document using MikTex but can't make qplot to execute. It works when using 'plot' though. Is this a normal behaviour? \documentclass[9pt]{article} \title{ggplot2 example} \begin{document} \maketitle \section*{Examples of using ggplot2} The goal is to be able to import ggplot2 graphics into the annual report. Hadley Wickham has done a great
2011 Sep 30
2
ggplot2 - extracting values of smooth
Suppose that I'm working on Hadley's diamond dataset and I want to review the relationship between price, colour and carat. I might run the following: library(ggplot2) #plot scatter and add some hex binning q<-qplot(carat,price,data=diamonds, geom=c("hex"), main="Variability of Diamond Prices by Carat and Colour") #facet to get one scatter for
2008 Dec 03
2
ggplot2 - suggestion for facet_wrap/grid
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20081203/26bd4ac1/attachment.pl>
2013 Jan 25
1
could not find function "qplot" after install.packages("ggplot2")
On OS X 10.8.2, after I installed ggplot2, and picked mirror of Singapore. it could not find qplot function. Could anyone pls help me ? Thank you. Pls see: > install.packages("ggplot2")--- Please select a CRAN mirror for use in this session ---also installing the dependencies ¡®colorspace¡¯, ¡®stringr¡¯, ¡®RColorBrewer¡¯, ¡®dichromat¡¯, ¡®munsell¡¯, ¡®labeling¡¯, ¡®plyr¡¯,
2009 May 07
1
I updated/reinstalled ggplot2 and the trouble started...
Hi Ian, Per your suggestion, I reinstalled R 2.9.0, then I reinstalled ggplot2 on top. The problem persists. Here's the what happens after the installation: > qplot (carat, price, data = diamonds, alpha = I(1/10)) Warning message: In grid.Call.graphics("L_points", x$x, x$y, x$pch, x$size) : semi-transparency is not supported on this device: reported only once per
2011 Jun 01
1
Plotting from functions
I can plot to png's fine when i run this directly from the top-level script/console: png('diamonds.png');qplot(carat,price,data=diamonds);dev.off() But for some reason it's not working when that's in a function: (function(){png('diamonds.png');qplot(carat,price,data=diamonds);dev.off()})() I suspect this is because the qplot's return value must be
2009 Jul 21
1
legend title in qplot
Hi, I've used the following command in qplot qplot(a$V1,geom="histogram",binwidth=0.15,fill = factor(a$V2),ylab="Frequency",xlab="Rate"); but the title in the legend shows up as factor(a$V2)...how can i change this? -- Rajesh.J [[alternative HTML version deleted]]
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]]
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
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
2008 Jan 15
4
Overlay plots from different data sets using the Lattice package
#After spending the entire day working on this question, I have decided to reach out for support: #I am trying to overlay a densityplot from one data set over a histogram of another, if I were to plot the two individually, they would look like: # data frame construction data.frame.A <- data.frame(rnorm(12*8), c(rep("one", 4), rep("two", 4), rep("three", 4)),
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
2007 Jun 14
1
back-transform predictors for x-axis in plot -- mgcv package
My question is related to plot( ) in the mgcv package. Before modelling the data, a few predictors were transformed to normalize them. Therefore, the x-axes in the plots show transformed predictor values. How do I back-transform the predictors so that the plots are easier to interpret? Thanks in advance, Suzan -- Suzan Pool Oregon State University Cooperative Institute for Marine
2012 Aug 07
1
Styling gridExtra's title and left labels
Hi, I'm using the gridExtra package to combine some graphs like in the arrangeGrob example. Each of the graphs has a title but they appear much larger than the overall combined plot title and left axis label. Does anyone know how I can control the style / size of the gridExtra labels? library(gridExtra) library(ggplot2) dsamp <- diamonds[sample(nrow(diamonds), 1000), ] p1 <-