similar to: Strange behavior when plotting with ggplot2 and lattice

Displaying 20 results from an estimated 10000 matches similar to: "Strange behavior when plotting with ggplot2 and lattice"

2010 May 13
1
ggplot2: qplot won't work
I have a script running in the StatET Eclipse environment that executes the ggplot2 command qplot in a function: # Creates the plot createPlot <- function(){ print("Lets plot!") qplot(1:10, letters[1:10]) } When executing the qplot line directly, it works. When executing the script it does not open a window and it it does not plot. Is there something important I have forgotten? I
2011 Jun 21
2
qplot/ggplot2 Questions
I took some data from an online poll about which R GUI people used most and I am messing around with it to learn how to use qplot. Specifically I am making a horizontal bar graph and I have two questions. 1. The categories are ordered in rather strange way at least to me. It is not alphabetical or ascending/descending order of votes cast so i had to manually state the order I wanted which is
2007 Jul 12
1
ggplot2 / reshape / Question on manipulating data
I'm an R newbie but recently discovered the ggplot2 and reshape packages which seem incredibly useful and much easier to use for a beginner. Using the data from the IMDB, I'm trying to see how the average movie rating varies by year. Here is what my data looks like: > ratings <- read.delim("groomed.list", header = TRUE, sep = "|", comment.char = "")
2011 Aug 04
1
Plotting just a portion of a smoother graph in ggplot2
Hi, I am using ggplot2 to with the following code: gmathk2 <- qplot(time,math,colour=Kids,data=kids.ach.lm.k5,geom="smooth",method="lm",formula=y~ns(x,1)) + opts(title="Smoother Plot: Math K-5") + xlab("Time") + ylab("Math") + scale_colour_brewer(pal="Set1"); gmathk2 This plots all the smoother for all the x values. What I'd like
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 Aug 04
1
Sweave and ggplot2
Hi all, I've been trying to run Sweave with R code embedded - using the ggplot2 package and in particular the qplot command. There appears to be a problem in Sweave not picking up that qplot is a function. Has anybody else tried to use qplot in Sweave and have you been successful? Any help would be very much appreciated. Kind Regards, Sorn Notice: This email and any attachments may
2012 Jul 18
1
ggplot2 qplot pch not working anymore
Is there a way to use a continuous variable to pch in qplot? I believe this worked in previous version. I need to specify certain values of a shape for particular points so that multiple graphs all show the same shapes for the same streams. I have gone to the original data and added a pch column that I would like to use to specify the shapes to pch in qplot. Any help would be greatly
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
2010 Feb 14
2
Problems with boxplot in ggplot2:qplot
Dataframe closed contains balances of closed accounts: each row has month of closure (Date-type column month) and latest balance. I would like to plot by-month distributions of balances. A qplot call below produces several warnings and no output. Can anyone help? Thank you. PS. A really basic task, very similar to the examples on p. 71 of the ggplot2 book, apart from a Date grouping column; I
2009 Apr 21
3
ggplot2 - boxplot of variables / columns
Hi, ggplot/qplot is great - it has really helped me do some nice things. However, simple boxplot of different columns/variables is a bit tricky, because of (i think) qplot's generic Y conditional on X input form. Se below. # Some data: a <- rnorm(100) b <- rnorm(100,1,2) c <- rnorm(100,2,0.5) # normal boxplot of a,b,c boxplot(a,b,c) # Looks good library(ggplot2) # loads qqplot2 #
2011 Dec 07
2
plotting and coloring longitudinal data with three time points (ggplot2)
Dear list, I have been struggling with this for some time now, and for the last hour I have been struggling to make a working example for the list. I hope someone out there have some experience with plotting longitudinal data that they will share. My data is some patient data with three different time stamps. First the patients are identified at different times (first time stamp). Second, they
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
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
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 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
2010 Jun 09
1
specifying plot symbol sizes in qplot or ggplot2
Hi. first things first ... thanks for ggplot2. Now my question. I'm using qplot to generate a plot as follows where X,Y,Z, A are columns in a dataframe. qplot(X, Y, data=XYDATA, color=Z, geom=c("point"), size=A) This works as expected. Factor A has three levels so there are three sizes of the point plot symbol. I understand that the factor levels are mapped to symbol sizes.
2011 Nov 28
1
plotting multiple lines on single graph ggplot2
Hello everyone I have some data of the following type. 100 200 300 400 500 1.1 1.2 1.3 1.4 1.5 600 700 800 900 1000 1.5 1.7 1.9 2.0 2.4 With plot() and points functions I can plot these 4 lines of data. But I dont know how to do it with qplot or ggplot functions. The scenario is something like this: the hundreds should appear on x-axis and the fractional values of y axis. Thanks alot. MEMON
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
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
2008 Sep 17
1
ggplot2 - deprecated guide= argument in
In the help for scale_fill_identity, it is written ## Not run: colour <- c("red","green","blue","yellow") qplot(1:4, 1:4, fill=colour, geom="tile") qplot(1:4, 1:4, fill=colour, geom="tile") + scale_fill_identity() # To get a legend, you also need to supply the labels to # be used