Hi!
Your example is not really easy to copy paste. Next time, try using
dput(), this would help a lot.
I haven't tried, but I think that cex.axis is correct. The problem is in
your call to barplot(). You have to specify xaxt="n" so that the
x-axis
won't be plotted. You then plot it with your call to axis() as you did.
You have to give in at= the x-coordinates of your ticks. I'm not sure
how it works with barplots, just play with it. It might be something
like at=c(1,2,3,4)
HTH,
Ivan
Le 8/4/2010 09:38, Roslina Zakaria a écrit :> Hi all,
>
> I would like to draw a side by side bar plot. How can I adjust the the
font
> size for the x-axis? Furthermore, I'm not sure what to write for
'at=?'. I
> tried cex.axis and cex.lab but still fail. Here is my data and code:
>
>> t(all)
> 0-100 100-150 150-200 200-250 250-300 300-350 350-400 400-620
> obs_data 382.000 177.000 156.0000 93.0 69.0000 45.000 14.0000 15.0000
> pre_gam 364.233 195.906 167.8515 95.1 63.2415 30.432 16.6425 17.5935
>
> bplt<- barplot(t(all),
col=c("blue","yellow"),beside=TRUE,xlab="Rainfall
(mm)",
> ylab="Frequency", main="Observed and predicted,
Dec-Feb
> Beec",ylim=c(0,400))
>
legend("topright",c("observed","predicted"),fill=c("blue","yellow"))
> axis(1, at =? , lab >
c("0-100","100-150","150-200","200-250","250-300","300-350","350-400","400-620"),
> cex.axis = 0.5)
>
>
> Thank you so much for your help.
>
>
>
> [[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.
--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra@uni-hamburg.de
**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php
[[alternative HTML version deleted]]