[R] how to paste a vector to expression?
Gavin Simpson
gavin.simpson at ucl.ac.uk
Wed Aug 18 10:29:41 CEST 2010
On Tue, 2010-08-17 at 13:49 -0700, Kay Cichini wrote:
> ..thank you!
>
> this generally works well - but after saving the result as jpeg i noticed
> that the printed "=" used with the expression looks different from the "="
> signs used for the same graph for another simple text annotation (i.e. the
> linewidths used with the expression are much smaller). maybe there is still
> another solution? - really no way using the paste command? curiously
> paste(expression(bar(x)),"=",dat) does not work..
It's drawn in a different font; probably because many of the glyphs you
can produce with plotmath don't exist in the fonts used for plain text
(but I am guessing).
Why can't you do all the labels using expression() if this bothers you
so?
plot(1:10, main = expression(bar(x) == dat),
ylab = expression(foo == bar),
xlab = expression("something else" == the~other))
Apologies if this has already been discussed/dismissed. I don't see the
rest of the thread in your message and I've been away from my email for
several weeks and didn't follow the list closely during that period.
HTH
G
>
> thanks,
> kay
--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Dr. Gavin Simpson [t] +44 (0)20 7679 0522
ECRC, UCL Geography, [f] +44 (0)20 7679 0565
Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/
UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
More information about the R-help
mailing list