Hello, I am using library(gplots) to do something like data(state) x1 <- state.area/10000 x2 <- x1+round((rnorm(length(state.area),3,3))) plotmeans(x1 ~ state.region) Is it possible to plot x2 to x1 in the same graph, something like: linesmeans(x2 ~ state.region) Best wishes, Cheba [[alternative HTML version deleted]]
Try adding par(new=TRUE) after plotting the first plot and then just plot the second one. You have to make sure that both use the same y axis but I will leave it to you to find out how ;-) (I would fix the y limits of both plots...) HTH Jannis cheba meier schrieb:> Hello, > > I am using > library(gplots) > to do something like > data(state) > x1 <- state.area/10000 > x2 <- x1+round((rnorm(length(state.area),3,3))) > plotmeans(x1 ~ state.region) > > Is it possible to plot x2 to x1 in the same graph, something like: > > linesmeans(x2 ~ state.region) > > Best wishes, > Cheba > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. > >
On 17.07.2011 14:36, h_bumann wrote:> The par(new = TRUE)-Trick seems to be fine, if you just want to add one or > two other lines. > > Whenever I plot a couple of graphs ontop of each other i find that the nice > vectorgraphics become cluttered. > Is there any way to use plotmeans() and to restrict it to the line only?- Please also reply to the original poster who may not be subscribed to the list. - Please cite the original question (and other relevant parts of the thread) since some readers of this list will delete messages before an answer arrives. Uwe Ligges> > Sincerly > Henning > > -- > View this message in context: http://r.789695.n4.nabble.com/plotmeans-tp2271405p3673297.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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.
Maybe Matching Threads
- plot separate groups with plotmeans()
- introducing jitter in overlapping graphs using ggplots (plotmeans). Also sciplot.
- Why don't formulas that work for lm() work for plotmeans?
- Adjusting Yaxis (ylim) limits on a plotMeans(DV, IV1, IV2, error.bars="se")
- plotMeans() is there a ylim argument? Please Help.