Dear all,
I would like to plot the dagger symbol in R (like LaTeX's \dagger).
However, I was unable to do so.
First, I thought maybe dagger actually exists just like the degree
symbol:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(degree))
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(dagger))
However, this was not very successful. New hope emerged that I will
succeed when I read the help page (as so often) for ?plotmath.
There I discovered the 'symbol' thing and read that the Adobe Symbol
font encodings are used. The closest thing I could fine, though, was:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(symbol("\247")))
But this is obviously not a dagger and it seems the Adobe Symbol font
does not have a dagger.
We also know this :-D
library(fortunes)
fortune("Yoda")
So maybe someone can give me some advice?
Thanks in advance,
Roland
----------
This mail has been sent through the MPI for Demographic Research. Should you receive a mail that is apparently from a MPI user without this text displayed, then the address has most likely been faked. If you are uncertain about the validity of this message, please check the mail header or ask your system administrator for assistance.
Plot dagger symbol in R
7 messages · Rau, Roland, Duncan Murdoch, Mark Difford +2 more
Rau, Roland wrote:
Dear all,
I would like to plot the dagger symbol in R (like LaTeX's \dagger).
However, I was unable to do so.
First, I thought maybe dagger actually exists just like the degree
symbol:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(degree))
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(dagger))
However, this was not very successful. New hope emerged that I will
succeed when I read the help page (as so often) for ?plotmath.
There I discovered the 'symbol' thing and read that the Adobe Symbol
font encodings are used. The closest thing I could fine, though, was:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(symbol("\247")))
But this is obviously not a dagger and it seems the Adobe Symbol font
does not have a dagger.
We also know this :-D
library(fortunes)
fortune("Yoda")
So maybe someone can give me some advice?
I think it will depend on your output device whether the character glyph exists, but this works for me on a Mac: plot(1, main="My dagger: \u2020") Duncan Murdoch
Hi Roland,
But this is obviously not a dagger and it seems the Adobe Symbol font does not have a dagger.
True, but ... Yoda was here.
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression("\u2020"))
text(x=0.4, y=0.6, labels=expression("\u2021"))
?plotmath, sub "Other symbols" ... "Any Unicode character can be...."
Regards, Mark.
PS: Works under Windows Vista, but ...
Rau, Roland wrote:
Dear all,
I would like to plot the dagger symbol in R (like LaTeX's \dagger).
However, I was unable to do so.
First, I thought maybe dagger actually exists just like the degree
symbol:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(degree))
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(dagger))
However, this was not very successful. New hope emerged that I will
succeed when I read the help page (as so often) for ?plotmath.
There I discovered the 'symbol' thing and read that the Adobe Symbol
font encodings are used. The closest thing I could fine, though, was:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(symbol("\247")))
But this is obviously not a dagger and it seems the Adobe Symbol font
does not have a dagger.
We also know this :-D
library(fortunes)
fortune("Yoda")
So maybe someone can give me some advice?
Thanks in advance,
Roland
----------
This mail has been sent through the MPI for Demographic Research. Should
you receive a mail that is apparently from a MPI user without this text
displayed, then the address has most likely been faked. If you are
uncertain about the validity of this message, please check the mail header
or ask your system administrator for assistance.
______________________________________________ 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.
View this message in context: http://www.nabble.com/Plot-dagger-symbol-in-R-tp21725141p21725439.html Sent from the R help mailing list archive at Nabble.com.
Hi, If all else fails, you could consider using LaTeX itself with psfrag, or perhaps a similar idea involving eps2pgf. http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/PsFrag Hope this helps, baptiste
On 29 Jan 2009, at 11:24, Rau, Roland wrote:
Dear all,
I would like to plot the dagger symbol in R (like LaTeX's \dagger).
However, I was unable to do so.
First, I thought maybe dagger actually exists just like the degree
symbol:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(degree))
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(dagger))
However, this was not very successful. New hope emerged that I will
succeed when I read the help page (as so often) for ?plotmath.
There I discovered the 'symbol' thing and read that the Adobe Symbol
font encodings are used. The closest thing I could fine, though, was:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(symbol("\247")))
But this is obviously not a dagger and it seems the Adobe Symbol font
does not have a dagger.
We also know this :-D
library(fortunes)
fortune("Yoda")
So maybe someone can give me some advice?
Thanks in advance,
Roland
----------
This mail has been sent through the MPI for Demographic Research.
Should you receive a mail that is apparently from a MPI user without
this text displayed, then the address has most likely been faked. If
you are uncertain about the validity of this message, please check
the mail header or ask your system administrator for assistance.
______________________________________________ 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.
_____________________________ Baptiste Augui? School of Physics University of Exeter Stocker Road, Exeter, Devon, EX4 4QL, UK Phone: +44 1392 264187 http://newton.ex.ac.uk/research/emag
On Thu, 29 Jan 2009, Mark Difford wrote:
Hi Roland,
But this is obviously not a dagger and it seems the Adobe Symbol font does not have a dagger.
True, but ... Yoda was here.
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression("\u2020"))
text(x=0.4, y=0.6, labels=expression("\u2021"))
?plotmath, sub "Other symbols" ... "Any Unicode character can be...."
Regards, Mark.
PS: Works under Windows Vista, but ...
That would be expected to work (in a UTF-8 locale || on Windows) && on a device with Unicode support && in a font that has the glyph. (it works on Windows because we fake much of a UTF-8 locale there). There is an alternative: dagger _is_ in the standard Adobe character set, so this will work as something \206 (untested) in 8-bit Windows character sets on windows(), postscript(), pdf() ... devices As ever, the information asked for in the posting guide helps us give a better answer.
Rau, Roland wrote:
Dear all,
I would like to plot the dagger symbol in R (like LaTeX's \dagger).
However, I was unable to do so.
First, I thought maybe dagger actually exists just like the degree
symbol:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(degree))
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(dagger))
However, this was not very successful. New hope emerged that I will
succeed when I read the help page (as so often) for ?plotmath.
There I discovered the 'symbol' thing and read that the Adobe Symbol
font encodings are used. The closest thing I could fine, though, was:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(symbol("\247")))
But this is obviously not a dagger and it seems the Adobe Symbol font
does not have a dagger.
But the Adobe Standard encoding does.
We also know this :-D
library(fortunes)
fortune("Yoda")
So maybe someone can give me some advice?
Thanks in advance,
Roland
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Dear all, thank you very much. Yes, indeed, I should have included the sessionInfo(). Both examples (unicode and standard encoding) work fine; however, I prefer the suggestion by Prof. Ripley since it allows me to do things like: plot(1, main=expression(e^"\206")) This fails, however, with: plot(1, main=expression(e^"\u2020")) Thank you once again, Roland
sessionInfo()
R version 2.7.0 (2008-04-22) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base
-----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Prof Brian Ripley Sent: Thursday, January 29, 2009 1:35 PM To: Mark Difford Cc: r-help at r-project.org Subject: Re: [R] Plot dagger symbol in R On Thu, 29 Jan 2009, Mark Difford wrote:
Hi Roland,
But this is obviously not a dagger and it seems the Adobe
Symbol font
does not have a dagger.
True, but ... Yoda was here.
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression("\u2020"))
text(x=0.4, y=0.6, labels=expression("\u2021"))
?plotmath, sub "Other symbols" ... "Any Unicode character
can be...."
Regards, Mark. PS: Works under Windows Vista, but ...
That would be expected to work (in a UTF-8 locale || on Windows) && on a device with Unicode support && in a font that has the glyph. (it works on Windows because we fake much of a UTF-8 locale there). There is an alternative: dagger _is_ in the standard Adobe character set, so this will work as something \206 (untested) in 8-bit Windows character sets on windows(), postscript(), pdf() ... devices As ever, the information asked for in the posting guide helps us give a better answer.
Rau, Roland wrote:
Dear all, I would like to plot the dagger symbol in R (like LaTeX's \dagger). However, I was unable to do so. First, I thought maybe dagger actually exists just like the degree symbol: plot(0:1,0:1, type="n") text(x=0.5, y=0.5, labels=expression(degree)) plot(0:1,0:1, type="n") text(x=0.5, y=0.5, labels=expression(dagger)) However, this was not very successful. New hope emerged that I will succeed when I read the help page (as so often) for ?plotmath. There I discovered the 'symbol' thing and read that the
Adobe Symbol
font encodings are used. The closest thing I could fine,
though, was:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(symbol("\247")))
But this is obviously not a dagger and it seems the Adobe
Symbol font
does not have a dagger.
But the Adobe Standard encoding does.
We also know this :-D
library(fortunes)
fortune("Yoda")
So maybe someone can give me some advice?
Thanks in advance,
Roland
-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________ 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.
---------- This mail has been sent through the MPI for Demographic Research. Should you receive a mail that is apparently from a MPI user without this text displayed, then the address has most likely been faked. If you are uncertain about the validity of this message, please check the mail header or ask your system administrator for assistance.
On 1/29/2009 8:56 AM, Rau, Roland wrote:
Dear all, thank you very much. Yes, indeed, I should have included the sessionInfo(). Both examples (unicode and standard encoding) work fine; however, I prefer the suggestion by Prof. Ripley since it allows me to do things like: plot(1, main=expression(e^"\206")) This fails, however, with: plot(1, main=expression(e^"\u2020")) Thank you once again, Roland
sessionInfo()
R version 2.7.0 (2008-04-22)
That's 9 months old -- ancient! The exact line you posted works for me in 2.8.1. However, I don't like the dagger in the default font; it looks better as plot(1, main=expression(e^"\u2020"), family="serif") Duncan Murdoch
i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base
-----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Prof Brian Ripley Sent: Thursday, January 29, 2009 1:35 PM To: Mark Difford Cc: r-help at r-project.org Subject: Re: [R] Plot dagger symbol in R On Thu, 29 Jan 2009, Mark Difford wrote:
Hi Roland,
But this is obviously not a dagger and it seems the Adobe
Symbol font
does not have a dagger.
True, but ... Yoda was here.
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression("\u2020"))
text(x=0.4, y=0.6, labels=expression("\u2021"))
?plotmath, sub "Other symbols" ... "Any Unicode character
can be...."
Regards, Mark. PS: Works under Windows Vista, but ...
That would be expected to work (in a UTF-8 locale || on Windows) && on a device with Unicode support && in a font that has the glyph. (it works on Windows because we fake much of a UTF-8 locale there). There is an alternative: dagger _is_ in the standard Adobe character set, so this will work as something \206 (untested) in 8-bit Windows character sets on windows(), postscript(), pdf() ... devices As ever, the information asked for in the posting guide helps us give a better answer.
Rau, Roland wrote:
Dear all, I would like to plot the dagger symbol in R (like LaTeX's \dagger). However, I was unable to do so. First, I thought maybe dagger actually exists just like the degree symbol: plot(0:1,0:1, type="n") text(x=0.5, y=0.5, labels=expression(degree)) plot(0:1,0:1, type="n") text(x=0.5, y=0.5, labels=expression(dagger)) However, this was not very successful. New hope emerged that I will succeed when I read the help page (as so often) for ?plotmath. There I discovered the 'symbol' thing and read that the
Adobe Symbol
font encodings are used. The closest thing I could fine,
though, was:
plot(0:1,0:1, type="n")
text(x=0.5, y=0.5, labels=expression(symbol("\247")))
But this is obviously not a dagger and it seems the Adobe
Symbol font
does not have a dagger.
But the Adobe Standard encoding does.
We also know this :-D
library(fortunes)
fortune("Yoda")
So maybe someone can give me some advice?
Thanks in advance,
Roland
-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________ 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.
---------- This mail has been sent through the MPI for Demographic Research. Should you receive a mail that is apparently from a MPI user without this text displayed, then the address has most likely been faked. If you are uncertain about the validity of this message, please check the mail header or ask your system administrator for assistance.
______________________________________________ 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.