[R] change axis label from -100-100 to 100-100
David Winsemius
dwinsemius at comcast.net
Tue Aug 21 03:12:58 CEST 2012
On Aug 20, 2012, at 5:43 PM, fawda283 wrote:
> Hi guys, i need help. I have an axis that runs from -100 -75, -50,
> -25, 0 25,
> 50, 75, 100. I need to somehow hide or remove the '-' in the axis
> label. Is
> there anyway to do this?? I would still like R to think of the left
> side of
> my graph as negatives, but visually appear as though they are not
> negative
> values (if that makes sense!) .
>
>
plot( x=c(-100, -75, -50, -25, 0, 25,
50, 75, 100), y=seq_along(c(-100, -75, -50, -25, 0, 25,
50, 75, 100)) , xaxt="n", xlab= "[-100 , 100]")
axis(1, at= c(-100, -75, -50, -25, 0, 25,
50, 75, 100), labels= abs(c(-100, -75, -50, -25, 0, 25,
50, 75, 100)) )
>
--
David Winsemius, MD
Alameda, CA, USA
More information about the R-help
mailing list