Hi, how can I print "<=" (I mean the symbol of just one character) in the main title of a plot? for example: plot(1:10, main=paste("x <=", x)) where variable x is some number generated on the fly. Thanks John
This is highly system dependent: what "character" do you intend to use for this 2 character representation? Hence, you need to follow the posting guide and give the "at a minimum" system info. ?sessionInfo -- Bert On Tue, Jun 28, 2011 at 10:25 AM, array chip <arrayprofile at yahoo.com> wrote:> Hi, how can I print "<=" (I mean the symbol of just one character) in the main > title of a plot? > > for example: > > plot(1:10, main=paste("x <=", x)) > > where variable x is some number generated on the fly. > > Thanks > > John > > ______________________________________________ > R-help at 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. >-- "Men by nature long to get on to the ultimate truths, and will often be impatient with elementary studies or fight shy of them. If it were possible to reach the ultimate truths without the elementary studies usually prefixed to them, these would not be preparatory studies but superfluous diversions." -- Maimonides (1135-1204) Bert Gunter Genentech Nonclinical Biostatistics
Thanks Bert. here is info: R version 2.12.2 (2011-02-25) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252 attached base packages: [1] splines stats graphics grDevices datasets utils methods base other attached packages: [1] rms_3.3-0 Hmisc_3.8-3 cmprsk_2.2-2 survival_2.36-5 rcom_2.2-3.1 rscproxy_1.3-1 loaded via a namespace (and not attached): [1] cluster_1.13.3 grid_2.12.2 lattice_0.19-17 tools_2.12.2 ----- Original Message ---- From: Bert Gunter <gunter.berton at gene.com> To: array chip <arrayprofile at yahoo.com> Cc: R <r-help at r-project.org> Sent: Tue, June 28, 2011 10:32:29 AM Subject: Re: [R] how to print "<=" in plot title This is highly system dependent: what "character" do you intend to use for this 2 character representation? Hence, you need to follow the posting guide and give the "at a minimum" system info. ?sessionInfo -- Bert On Tue, Jun 28, 2011 at 10:25 AM, array chip <arrayprofile at yahoo.com> wrote:> Hi, how can I print "<=" (I mean the symbol of just one character) in the main > title of a plot? > > for example: > > plot(1:10, main=paste("x <=", x)) > > where variable x is some number generated on the fly. > > Thanks > > John > > ______________________________________________ > R-help at 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. >-- "Men by nature long to get on to the ultimate truths, and will often be impatient with elementary studies or fight shy of them. If it were possible to reach the ultimate truths without the elementary studies usually prefixed to them, these would not be preparatory studies but superfluous diversions." -- Maimonides (1135-1204) Bert Gunter Genentech Nonclinical Biostatistics
On 2011-06-28 10:25, array chip wrote:> Hi, how can I print "<=" (I mean the symbol of just one character) in the main > title of a plot? > > for example: > > plot(1:10, main=paste("x<=", x)) > > where variable x is some number generated on the fly.x <- 2.718 plot(0, 0) title(bquote( x %<=% .(x) )) ?plotmath Peter Ehlers> > Thanks > > John > > ______________________________________________ > R-help at 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.
Thank Peter! How do I make the title in bold font? John ----- Original Message ---- From: Peter Ehlers <ehlers at ucalgary.ca> To: array chip <arrayprofile at yahoo.com> Cc: R <r-help at r-project.org> Sent: Tue, June 28, 2011 10:52:07 AM Subject: Re: [R] how to print "<=" in plot title On 2011-06-28 10:25, array chip wrote:> Hi, how can I print "<=" (I mean the symbol of just one character) in the main > title of a plot? > > for example: > > plot(1:10, main=paste("x<=", x)) > > where variable x is some number generated on the fly.x <- 2.718 plot(0, 0) title(bquote( x %<=% .(x) )) ?plotmath Peter Ehlers> > Thanks > > John > > ______________________________________________ > R-help at 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.