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 positions below, to
the left of, above and to the right of the specified coordinates.

So, the coordinates should be "x=4, y=2" for your case.
Additionally you can use ltext() function which is explained in the same
panel.text() help.


Regards,
Carlos Ortega
www.qualityexcellence.es

2011/10/10 Allan Sikk <a.s...@ucl.ac.uk>

> 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[P]),
> panel=function( ...) {
>    panel.lines(..., type="l", col.line="black", lwd=.25)
>    panel.xyplot(..., type="p", col="black", cex=.5, pch=20)
>    panel.text(..., lab=t, cex=.5, pos=c(4,2))
> })
>
> Many thanks,
> Allan
>
> ______________________________**________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
> PLEASE do read the posting guide http://www.R-project.org/**
> posting-guide.html <http://www.R-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to