[R] Scope of Axes

bgnumis bgnum bgnumis at gmail.com
Tue Oct 20 18:27:38 CEST 2015


Hi all,

I want to plot two graphs and I use this :

par(mar=c(10,6,6,6))
matplot(Simulation,type="l")

abline(h = 0, lwd = 2, col = "black")

fhist<-hist(Simulation,plot=FALSE)
par(mar=c(6,0,6,6))
barplot(fhist$counts,axes=FALSE, space=0,horiz=TRUE,col="lightgray")


The question is, that the legth of the hist plot is not equilibrated with
the main plot so the fhist is not achiving the goal I´m looking so that it
happens what I attach in png, it seems that the right plot is central value
is below the value of the simulation. How can I ensure that de max min in
the left is the same that in the right (second) plot?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adjust.png
Type: image/png
Size: 39511 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20151020/91b29ae2/attachment.png>


More information about the R-help mailing list