Skip to content
Prev 202117 / 398503 Next

Histogram and Density on the the same graph

Trafim,

If you are plotting more than one variables on the same plot e.g. by using
the lines() or points() function, then the limits of the X and Y axes are
set based on the first variable you plot. So, you would have to set the xlim
and ylim to the limits of the variable with the widest range, otherwise you
would sometimes see some data left out.