0

I've managed to use the mfrow() function to set them up side by side, but I'd like them to appear on the same scale, best if on the same plot, actually. How do I do this?

Set 2 different plots in window

par(mfrow=c(1,2))

Set up 2 different plots: Infected in Utero vs Infected >5 years

plot(age.group [in.utero=="yes"], IQ [in.utero=="yes"], xlab="Age group tested", ylab="IQ", main = "Infected in Utero", col=myCols) 

plot(age.group [in.utero=="no"], IQ [in.utero=="no"], xlab="Age group tested", ylab- "IQ", main = "Infected >5 Years", col=myCols)

Here's 2 separate plots of data.

Community
  • 1
  • 1
  • Perhaps have a look at [this question](https://stackoverflow.com/questions/14904748/creating-multiple-scatter-plots-with-same-axes-in-r). Bottom answer discusses base plotting system. Other answers include the same for ggplot2 and lattice. Your question might be partly a duplicate of that question. – 4rj4n Mar 20 '18 at 10:34
  • should it look like this ? `library(ggplot2) ;` `ggplot(mtcars, aes(y = hp, x=as.factor(gear) )) + geom_boxplot()` – Joyvalley Mar 20 '18 at 12:04

0 Answers0