[R] lattice: how to format axis labels?

Alan Davis adavis at saipan.com
Thu Jul 24 15:27:08 CEST 2003


On 23 Jul 2003 09:12:07 -0500
Douglas Bates <bates at stat.wisc.edu> wrote:

> High-level control of axes in xyplot is implemented by the scales
> argument to xyplot.  You can include components 'at' and 'labels' in
> a list given as the scales argument.  See ?xyplot.
> 
> Wladimir Eremeev <wl at eimb.ru> writes:
> 
> > jhcc> check out 'sprintf' for formating in a specific way.
> > 
> > This will not solve the problem.
> > I will have to specify the argument like labels=(...).
> > I would like to avoid it.
> > 
> > I wonder if there a key or option to make automatically appearing
> > labels be formatted in the mentioned way.
> > I haven't found it in the documentation.
> > 
> > =====================================================
> > jhcc>   I draw graphics with xyplot() function.
> > jhcc>   Labels on the y axis are appearing as follows: "1.5, 1, 0.5,
> > 0"
> > 
> > jhcc>   I'd like to have them to be "1.5, 1.0, 0.5, 0.0", i.e. with
> > fixed jhcc>   number of digits after the dot (one in this case).
> > 
> > jhcc>   Is there any way to do this without implicit specifying
> > labels?
> 
> I don't think so.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 


-- 
adavis at saipan.com                                     1-670-322-6580
    Alan E. Davis,  PMB 30, Box 10006, Saipan, MP 96950-8906, CNMI

I have steadily endeavored to keep my mind free, so as to give up any
hypothesis, however much beloved -- and I cannot resist forming one 
on every subject -- as soon as facts are shown to be opposed to it.  
                                  -- Charles Darwin (1809-1882)

The right to search for truth implies also a duty; one must not
conceal any part of what one has recognized to be true. 
                                  -- Albert Einstein 

As we enjoy great advantages from the inventions of others we should
be glad of an opportunity to serve others by any invention of
ours, and this we should do freely and generously.
                                  -- Benjamin Franklin




More information about the R-help mailing list