Re: [R] plot 2 bars

From: Yasir Kaheil <kaheil_at_gmail.com>
Date: Tue, 13 May 2008 20:34:17 -0700 (PDT)

try:
obs_data<- c(26,43,20,14,18);
pre_gam<-c(26.284,61.101,29.016,11.160,11.439) (obs.hist <- hist(obs_data, breaks = 10, plot = FALSE)); plot(obs.hist)
plot(obs.hist, border = "dark blue", col = "light blue", xlab ="whatever") (pre.hist <- hist(pre_gam, breaks = 10, plot = FALSE)); lines(pre.hist, col = "Midnight Blue")

You can manipulate the number of breaks to reflect different bin widths.

hth

y

Roslina Zakaria wrote:
>
> Hi r-expert,
> How do I plot this 2 histogram side by side so that it is easy to compare
> for bin range 0,5,10,15, 20 and more
> obs_data pre_gam
> [1,] 2695 2677.284
> [2,] 43 61.101
> [3,] 20 29.016
> [4,] 14 11.160
> [5,] 18 11.439
> Thanks in advance.
>
>
>
>
> ______________________________________________
> 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.
>
>



Yasir H. Kaheil
Catchment Research Facility
The University of Western Ontario
-- 
View this message in context: http://www.nabble.com/plot-2-bars-tp17222387p17222757.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.
Received on Wed 14 May 2008 - 04:49:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 14 May 2008 - 06:30:39 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive