[R] how to show the number of each axis interval (plot)

Ben Bolker bbolker at gmail.com
Mon Sep 20 15:54:46 CEST 2010


Duncan Murdoch <murdoch.duncan <at> gmail.com> writes:

> 
>   On 20/09/2010 9:44 AM, elaine kuo wrote:
> > Dear List,
> >
> > I am using plot for homework.
> 
> You should ask your instructor or teaching assistant for help on homework.
> 
> Duncan Murdoch
> 
> > The x-axis covered from 0 to 80, with 4 intervals.
> > However, the plot only showed 0, 40, 80.
> > 20 and 60 disappeared.
> >
> > Please kindly advise how to show 0, 20, 40, 60, 80 for the axis interval.

  To be fair, there is one surprising wrinkle of the standard R graphics
interface.  If your plot window is sufficiently compressed that some labels
would overlap, those labels sometimes silently disappear.  If this is the
problem, then manually expanding the size of the plot window should make
those labels reappear -- or, in printed graphics, expanding the width
and height when you open the graphics device.  Alternatively you can
change the size of the axis labels.

 ?axis, ?par ...



More information about the R-help mailing list