Thank You!! On Sun, Oct 26, 2014 at 10:01 PM, Dennis Murphy <djmu...@gmail.com> wrote:
> I'd suggest using the knitr code chunk options in Rmarkdown to control > the plot size in the document; e.g., > > ```{r myplot, fig.height=5, fig.width=6} > <your plot code> > ``` > If you use RStudio, it will provide code completion for you as you > type the code chunk header. > > Dennis > > On Sun, Oct 26, 2014 at 6:03 PM, David Doyle <kydaviddo...@gmail.com> > wrote: > > Hi Folks, > > > > I'm trying to adjust the plot size so it can be pulled into a document by > > Rmarkdown. Any suggestions?? > > > > . The data and code are below > > > > library(ggplot2) > > > > MS <- read.table("http://www.doylesdartden.com/R/MS.csv", header=TRUE, > > sep=",",) > > > > #Sets whic are detections and nondetects > > MS$Detections <- ifelse(MS$D_AMMONIA==1, "Detected", "NonDetect") > > > > #does the plot > > p <- ggplot(data = MS, aes(x=Year, y=AMMONIA, col=Detections)) + > > geom_point(aes(shape=Detections)) + > > > > ##sets the colors > > scale_colour_manual(values=c("black","red")) + > > > > #location of the legend > > theme(legend.position=c("none")) + > > > > #sets the line color, type and size > > geom_line(colour="black", linetype="dotted", size=0.5) + > > ylab("Ammonia (mg/L)") + > > ##Graph title > > ggtitle("Lower Mudstone Ammonia Time Sereis") > > > > ## does the graph using the Well IDs as the different wells. > > p + facet_grid(Well ~ .) > > > > > > -- > > -- > > You received this message because you are subscribed to the ggplot2 > mailing > > list. > > Please provide a reproducible example: > > https://github.com/hadley/devtools/wiki/Reproducibility > > > > To post: email ggpl...@googlegroups.com > > To unsubscribe: email ggplot2+unsubscr...@googlegroups.com > > More options: http://groups.google.com/group/ggplot2 > > > > --- > > You received this message because you are subscribed to the Google Groups > > "ggplot2" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to ggplot2+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.