Skip to content

axis scaling problem

2 messages · Andreas Zankl, Marc Schwartz

#
On the attached figure, I had to use ylim (0,3) to have enough space 
for the labels to be plotted. However, the values on the y-axis are 
never bigger than 1, so the axis labeling does not make much sense. 
Can I only get y-axis tick marks at 0 and 1 but still have the 
additional plotting space for the labels?

Thanks
Andreas
#
On Fri, 2005-10-28 at 10:27 +0200, Andreas Zankl wrote:
Your attachment did not come through and without either reproducible
code or the image, it would be difficult to provide specific
recommendations.

However, things to consider:

1. Reduce the size of the fonts for your axis labels to make more room.
See ?par and note the cex.axis parameter.

2. Consider using meaningful abbreviations for your labels to shorten
them.

3. Consider rotating the labels using par("las"). You will likely need
to adjust the plot margins using par("mar") as well to make room for the
rotated labels.

4. See R FAQ 7.27 "How can I create rotated axis labels?" which is a
method to enable axis labels rotated to something between horizontal and
vertical (ie. 45 degrees).

HTH,

Marc Schwartz