similar to: bug in qplot (library ggplot2)

Displaying 20 results from an estimated 6000 matches similar to: "bug in qplot (library ggplot2)"

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
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]]
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
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
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 <-
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¡¯,
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
2008 Aug 25
2
ggplot boxplot - how to order categories
I am interested in creating a boxplot using ggplot or qplot where I can specify the order of the categories being plotted on the x-axis. For example, the following command plots the categories (diamond color) in alphabetic order (D, E, ..., J): qplot(color, price/carat, data=diamonds, geom="boxplot") I want to know how I can modify this command so that the categories are plotted in a
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
2012 Jan 16
2
ggplot2 stacked bar - sum of values rather than count
Hi, I'm trying to create a stacked bar plot using ggplot2. Rather than plotting the count of each of the 13 "Bar" factors on the Y axis, I would like to represent the sum of the Values associated with each of the 13 "Bar" factors. Is there a way to do that? Given the following data, that would obviously mean that there would be some negative sums represented. Here's
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
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
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 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]]
2008 Jan 04
1
Unicode whitespace
It would be nice if R ignored more unicode white space characters. For example, if I have "\u2028" in a command (which I get from a line-break in keynote) I get the following error: > qplot(carat, price, data = diamonds, colour=clarity) Error: unexpected input in "qplot(carat, price, data = diamonds, ?" And occasionally have such problems when copying and pasting from
2009 Sep 11
1
bar chart with means - using ggplot
Like this? # example using qplot library(ggplot2) meanprice <- tapply(diamonds$price, diamonds$cut, mean);meanprice cut <- factor(levels(diamonds$cut), levels = levels(diamonds$cut)) qplot(cut, meanprice, geom="bar", stat="identity", fill = I("grey50")) dev.new() # create a new graph to compare with qplot # Example using ggplot ggdata <-
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 Oct 29
1
multiple pages with ggplot2 facet_wrap?
I currently use lattice functions to produce multiple pages of plots using the "layout" argument to specify the number of rows and columns of panels, e.g., xyplot(price ~ carat | clarity, diamonds, layout = c(2, 2)) This results in 2 pages of 4 panels each. "diamonds" is a data.frame distributed with ggplot2. I would like to do the same with ggplot2 but have been
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.
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