[R] Request for Help: remove zero in fraction from tick labeling

David Winsemius dwinsemius at comcast.net
Sun Nov 6 15:50:18 CET 2011


On Nov 6, 2011, at 9:07 AM, Chee Chen wrote:

> Dear All,
> I would like to know how to do the following:
> 1. suppose I have x values from the ordered from 0, 0.5, 1, and  
> would like to label these three points on the x-axis.
> 2. However, R labels them as 0.0, 0.5, 1.0. But I wan5 them to be  
> 0, .5, 1, since the former way uses limited space of a multi-subgrap  
> plot by adding extra zeros

as.character(c(0, .5, 1))
[1] "0"   "0.5" "1"

I'm guessing that you are doing some sort of potting and using these  
as axis labels but without code that remains a guess.

>
> Thank you,
> Chee
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list