similar to: Can not save plot to png file correctly

Displaying 20 results from an estimated 2000 matches similar to: "Can not save plot to png file correctly"

2010 May 31
0
Put two plots side by side
Two different ways: library(ggplot2) x=5 size=50 A=data.frame(X=sample(x, size, replace=T), Y=sample(x, size, replace=T),a=rep(1:2,each=25));A # Facetting qplot(X,Y,data=A) + geom_jitter(position=position_jitter(width=.03)) + facet_grid(.~a) # Or with vp p=qplot(X, Y, data=A) + geom_jitter(position=position_jitter(width=.03)) ggsave(p, file='main.png') p1=qplot(X, Y, data=A) +
2010 May 18
2
Function that is giving me a headache- any help appreciated (automatic read )
note: whole function is below- I am sure I am doing something silly. when I use it like USGS(input="precipitation") it is choking on the precip.1 <- subset(DF, precipitation!="NA") b <- ddply(precip.1$precipitation, .(precip.1$gauge_name), cumsum) DF.precip <- precip.1 DF.precip$precipitation <- b$.data part, but runs fine outside of the function: days=7
2008 Nov 21
0
ggplot2 - version 0.8
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 Nov 21
0
ggplot2 - version 0.8
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 Jun 07
2
ggplot2 and facet
I have a data frame (attached) that has interpolated EOT errors for each minute before flight landing. It also has the runway and an index for the flight: > > times[1:4,] time error runway flight 1 0 -0.02206235 04R 1 2 1 -0.07961631 04R 1 3 2 -0.13795380 04R 1 4 3 -0.20726073 04R 1 > > sapply(times, class) time error
2009 Jan 22
1
ggplot2 example
I need to plot two graphics just like the example below but for some reason your example crashes. Using facet_wrap seems to be the cause: library(ggplot2) upper <- with(economics, data.frame(date,value = psavert, position = "upper")) upper lower <- with(economics, data.frame(date,value = unemploy,position = "lower")) lower #upper$date <-
2009 Aug 20
1
ggsave to .png bug in ggplot2 (?)
Text is really small and legend boxes are huge in this plot when saved to .png with ggsave. Plot is correct (i.e. looks the same as the screen) when saved with dev.print. Saving to .pdf with ggsave give the correct output. I'm a noob at ggplot2 so this may be user error rather than a bug. However the interface to ggsave seems simple enough to exclude many possibilities for screwing this up
2009 Oct 06
1
ggplot2 applying a function based on facet
Look at the bottom of the message for my question #here is a little function that I wrote USGS <- function(input="discharge", days=7){ library(chron) library(gsubfn) #021973269 is the Waynesboro Gauge on the Savannah River Proper (SRS) #02102908 is the Flat Creek Gauge (ftbrfcms) #02133500 is the Drowning Creek (ftbrbmcm) #02341800 is the Upatoi Creek Near Columbus (ftbn) #02342500 is
2010 Jun 23
1
Plotting Data on a Map
Hi: I am practicing with the attached shapefile and was wondering if I can get some help. Haven't used 'rgdal' and 'maptools' much but it appears to be a great way bring map data into R. Please take a look at the comments and let me know if I need to explain better what I am trying to accomplish. library(rgdal) library(maptools) library(ggplot2) dsn="C:/Documents and
2010 Aug 23
2
change order of plot panels in faceted ggplot/qplot
Hi, I have a 5-paneled figure that i made using the facet function in qplot (ggplot). I've managed to arrange the panels into two rows/ three columns, but for the sake of easy visual comparisons between panels in my particular dataset, I want to have the two plots on the bottom align on the right hand side of the figure instead of the left. Here's an example: m <-
2013 Aug 19
2
Problemas con ggsave(paste('img/',plotName,'.png', sep='')
Estimados usuarios de R: Soy nuevo en R, le ruego disculpa por mi *Ignorancia*. Estoy corriendo la siguiente instruccion, ggsave(paste('img/',plotName,'.png', sep='') y resulta el error: ggsave(paste('img/',plotName,'.png', sep='') Saving 7.32 x 4.87 in image Error in grDevices::png(..., width = width, height = height, res = dpi, :
2010 Apr 29
1
Sweave question
Hi: I am using Sweave and texi2dvi to generate a LaTeX document but can't find the way to hide the graphics while the R chunks are being executed. I thought results=hide would do it but that't not the case. If I do: \begin{figure}[h] <<figA=true,echo=F,fig=T,results=hide>>= a < rnorm(1000) plot(a) @ \caption{Weekly estimates.} \label{figure:ggplot1} \end{figure} The
2008 Nov 22
2
ggplot2 - facet_grid and facet_wrap
Hello R users (and Hadley) I have another question about ggplot2 :-) (version 0.8) `dat` <- structure(list(D = c("a", "b", "c", "d"), G = c(1.51520888871520, 1.88812208268440, -6.60521862, 0.55968739), E = c(1.38888592256404, 1.39366168665589, 1.22509259382058, 1.36617701059296), I = c(6.92634958902857, 6.94416045215158, 13.2179488828556,
2010 Feb 24
3
ggsave in Linux
I have a script that creates a qplot that is then saved as a .png file which works fine on Windows. But I also work on Linux servers via Putty and would like to be able to create and save my plots to my working directory. Is there a way I can ggsave my qplot without utilizing X11 in Linux? I don't need to view the plot in Linux, I just want the plot created and immediately saved to my working
2009 Apr 10
1
png with ggplot on windows xp
Hi Group, I posted this question on the ggplot list and was advised to try here also. The code below produces a plot as a png and pdf. The pdf looks great, and I cannot make the png look this way. I've tried various combinations of height, width, and dpi, but it has not worked out so far. Any suggestions to make the png look like the pdf? I received a response that the problem does not occur
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
2011 Jun 08
3
How to suppress factor labels
I am using ggplot2 to make a boxplot that overlays a scatterplot: pp = qplot(time, error, data=times, size=I(1), geom="jitter", main=title, ylab="Error (min)", xlab="Time before ON (min)", alpha=I(1/10), color=times$runway, ylim=c(-30,40)) pp2 = pp + with(times, facet_wrap(~ runway, ncol=2)) print(pp2 + geom_boxplot(alpha=.5,
2009 Feb 25
0
ggplot2 0.8.2
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
2009 Feb 25
0
ggplot2 0.8.2
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 Feb 13
1
Changes titles in ggplot2 plot
Dear Colleagues, In the following simple ggplot2 code: -------------------------------- m <- ggplot(d.fig, aes(time, prob)) m + stat_summary(fun.data = "median_hilow", conf.int = .95, geom = "smooth") + facet_wrap(~ Cohort, nrow=1) + coord_cartesian(ylim = c(0, .03)) -------------------------------- Is there a way to replace the y-axis label from "prob" to