Re: [R] "pos" in panel.text

2011-10-15 Thread Deepayan Sarkar
On Mon, Oct 10, 2011 at 6:31 PM, Allan Sikk wrote: > Here's the code. The problem seems to be specific for lattice as I can > easily use a vector with pos in "plot". lattice::panel.text() does not support vector 'pos'. (Not very difficult to fix, and I'll put it on my TODO list). For now, you wil

Re: [R] "pos" in panel.text

2011-10-10 Thread Carlos Ortega
Hi Allan, Please could you send the modified code where now it should appear x and y coordinates?. I do not fully understand the error message you get. Regards, Carlos Ortega www.qualityexcellence.es 2011/10/10 Allan Sikk > Thanks, Carlos, > > Tried that, but no success, still getting this err

Re: [R] "pos" in panel.text

2011-10-10 Thread Carlos Ortega
Hi, OK. Have you tried to run your code without the "pos" parameter? Based on the help, "pos" should be just *one* parameter. "pos" offers a finer adjustment of the text. But in your case, the first thing to get is that the text label is represented at the specified coordinates. Besides "pos" you

Re: [R] "pos" in panel.text

2011-10-10 Thread Carlos Ortega
Hello, To check the possible values of "pos" parameter you need to review "text()" as it is indicated in the lattice help of panel.text(). In text() it says: pos a position specifier for the text. If specified this overrides any adj value given. Values of 1, 2, 3 and 4, respectively indicate po

Re: [R] "pos" in panel.text

2011-10-10 Thread Allan Sikk
Here's the code. The problem seems to be specific for lattice as I can easily use a vector with pos in "plot". trellis.device(,width=600, height = 400) xyplot(Npop~Narea, scales=list(x=list(log=TRUE, at=my.at,labels = formatC(my.at, big.mark = ",", format="d")), y=list(log=TRUE, at=c(1,10,100,10

Re: [R] "pos" in panel.text

2011-10-10 Thread Allan Sikk
Thanks, Carlos, Tried that, but no success, still getting this error message: Warning messages: 1: In if (pos == 1) { : the condition has length > 1 and only the first element will be used 2: In if (pos == 2) { : the condition has length > 1 and only the first element will be used Thanks,

[R] "pos" in panel.text

2011-10-10 Thread Allan Sikk
Hi, I need to vary the placements of data labels but I cannot assign a vector to "pos" option. Any vectors work fine with "cex", for example. What could be the problem here? xyplot(Npop~Narea, data=size, scales=list(x=list(log=TRUE), y=list(log=TRUE), xlab=expression(N[A]), ylab=expression(N[