[R] no y-axis

Marc Schwartz marc_schwartz at me.com
Mon Nov 12 20:21:31 CET 2012


Or perhaps something this:

plot(1:10, axes = FALSE, ann = FALSE)
axis(2, at = 1:10, tick = FALSE, lty = "blank")

and if you want the x axis:

axis(1, at = 1:10)

Not clear if you want the frame around the plot region or not. If so, there are some options using ?box and see ?par, specifically, 'bty', for options there. Or, you can always use ?segments, knowing that par("usr") gives you the coordinates of the plot region corners...

Regards,

Marc Schwartz


On Nov 12, 2012, at 1:04 PM, Rui Barradas <ruipbarradas at sapo.pt> wrote:

> Hello,
> 
> If you want to completely remove the axis, overplot in color white.
> 
> plot(1:10, yaxt = "n")
> axis(2, at = 1:10, labels = 1:10, tick = FALSE)
> axis(2, at = 1:10, labels = 1:10, col = "white")
> 
> Hope this helps,
> 
> Rui Barradas
> Em 12-11-2012 17:18, Geophagus escreveu:
>> Hi and thanks for your answer,
>> 
>> I need no axis - only the labels.
>> In your example 1 to 10.
>> 
>> Greetz
>> GeO
>>




More information about the R-help mailing list