Dear all,

how can I plot a line graph and a bar graph in one single figure? I tried 
to combine "barplot" and "plot". Even though they both have the same 
x-values (1 to 55),  it just doesnt look as if they match in their scale 
(the barplot is much wider than the "plot"....even though I tried to put 
limits on the x-axis).
Here is an example of what I did:

barplot(y, xaxt="n",yaxt="n",ylim=c(-1,45), xlim=c(1,55))
...
par(new=TRUE)
plot(x, ynew, lty=2, type="l", ylim=c(0,15), xlim=c(1,55))

Another question: how can I make sure that the "0"-values from the barchart 
are displayed as well?

Thank you so much!

Anne-Katrin
    
-- 
Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! 
http://games.entertainment.gmx.net/de/entertainment/games/free

        [[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.

Reply via email to