Re: [R] right justify right-axis tick values in lattice

2011-10-17 Thread Deepayan Sarkar
On Sun, Oct 16, 2011 at 7:20 PM, David Winsemius wrote: > > On Oct 16, 2011, at 1:17 AM, Richard M. Heiberger wrote: > >> How can I right justify the right-axis tick values?  They appear in the >> example below as left-justified. >> >> I have tried several different ways and all fail in different

Re: [R] right justify right-axis tick values in lattice

2011-10-16 Thread baptiste auguie
Hi, You could also pad the text labels with phantom 0s, ghostrighter <- function(x, ...){ n <- sapply(x, nchar) nmax <- max(n) padaone <- function(ii){ si <- paste(rep("0", length= nmax - n[ii]), collapse="") as.expression(bquote(phantom(.(si)) * .(x[ii]) )) } sapply(seq_along(

Re: [R] right justify right-axis tick values in lattice

2011-10-16 Thread Paul Murrell
Hi On 16/10/2011 6:17 p.m., Richard M. Heiberger wrote: How can I right justify the right-axis tick values? They appear in the example below as left-justified. I have tried several different ways and all fail in different ways. The example below creates the right axis tick value with no attem

Re: [R] right justify right-axis tick values in lattice

2011-10-16 Thread Richard M. Heiberger
Perfect. Thank you David. Since I almost always want right-axis numeric ticks to be right justified, I will include this function as part of the next version of the HH package (any day now), listing you as author. Would you consider sending this as a proposed patch to lattice? As a patch it migh

[R] right justify right-axis tick values in lattice

2011-10-15 Thread Richard M. Heiberger
How can I right justify the right-axis tick values? They appear in the example below as left-justified. I have tried several different ways and all fail in different ways. The example below creates the right axis tick value with no attempt at adjustment. alternates I have tried are 1. formattin