[R] Adding bars to the right of existing ones using barplot

Petr Klasterecky klaster at karlin.mff.cuni.cz
Tue Mar 13 21:06:59 CET 2007


Add/subtract a small constant to/from your latter dataset (x-values) and 
plot it without axes.

Petr

Jason Horn napsal(a):
> I'm trying to create a barplot that has two sets of data next to each  
> other.  I'm using barplot with the add=TRUE option, but this simply  
> adds the second dataset on top of the first, obscuring it.  How do I  
> add the new data to the right on the existing barplot so that both  
> sets are visible?  I've been playing with all sorts of option and  
> reading the list archives with no luck.
> 
> Thank you anyone who has the answer.
> 
> - Jason
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
> 

-- 
Petr Klasterecky
Dept. of Probability and Statistics
Charles University in Prague
Czech Republic



More information about the R-help mailing list