On 09/21/2010 08:55 PM, Joel wrote:

Hi

I got a barplot that has values between 0-150 and the y-axis shows the steps
0 50 100 and 150 but I would like to change it to 0 10 20 30... ...130 140
150

Hi Joel,
This is a combination of the "pretty" calculation of axis tick intervals and the silent omission of labels that appear to be crowded. You can probably get the fifteen labels by adding:

# set the axis labels to all horizontal text
par(las=1)
# add the yaxt argument to plot
plot(...,yaxt="n",...)
# display the axis
axis(2,at=seq(0,150,by=10),labels=seq(0,150,by=10))

If some of the labels are missing, you might have to turn to staxlab in the plotrix package or a similar function.

Jim

______________________________________________
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.

Reply via email to