display double dot over character in plotmath?

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

display double dot over character in plotmath?

Ranjan Maitra-3
Hi,

Is it possible to display double dot (umlaut) over a character such as would be possible using \ddot x in LaTeX? I can do this using tikzDevice but I wanted something simpler to point to.

Here is an example of what I would like to do, but it is not quite there:

require(ggplot2)
data<-as.data.frame(c("a","b","c","a","b","c"))
colnames(data)<-"Y"
data$X<-c(1:6)
data$Z<-c(1,2,3,1,2,3)

ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) + xlab(expression(atop(top,bold(Age~"à"))))

I would like to put in a double dot over the "a" in the x-axis instead of "`".

Many thanks for any suggestions and best wishes,
Ranjan

--
Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please respond to the mailing list if appropriate. For those needing to send personal or professional e-mail, please use appropriate addresses.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

Daniel Nordlund-3
On 5/12/17 4:55 PM, Ranjan Maitra wrote:

> Hi,
>
> Is it possible to display double dot (umlaut) over a character such as would be possible using \ddot x in LaTeX? I can do this using tikzDevice but I wanted something simpler to point to.
>
> Here is an example of what I would like to do, but it is not quite there:
>
> require(ggplot2)
> data<-as.data.frame(c("a","b","c","a","b","c"))
> colnames(data)<-"Y"
> data$X<-c(1:6)
> data$Z<-c(1,2,3,1,2,3)
>
> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) + xlab(expression(atop(top,bold(Age~"à"))))
>
> I would like to put in a double dot over the "a" in the x-axis instead of "`".
>
> Many thanks for any suggestions and best wishes,
> Ranjan
>

You haven't told what OS you are using, but with Windows OS, you can get
the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
press 0228 on the numeric keypad.


Hope this is helpful,

Dan

--
Daniel Nordlund
Port Townsend, WA  USA

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

Ranjan Maitra-3
On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund <[hidden email]> wrote:

> On 5/12/17 4:55 PM, Ranjan Maitra wrote:
> > Hi,
> >
> > Is it possible to display double dot (umlaut) over a character such as would be possible using \ddot x in LaTeX? I can do this using tikzDevice but I wanted something simpler to point to.
> >
> > Here is an example of what I would like to do, but it is not quite there:
> >
> > require(ggplot2)
> > data<-as.data.frame(c("a","b","c","a","b","c"))
> > colnames(data)<-"Y"
> > data$X<-c(1:6)
> > data$Z<-c(1,2,3,1,2,3)
> >
> > ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) + xlab(expression(atop(top,bold(Age~"à"))))
> >
> > I would like to put in a double dot over the "a" in the x-axis instead of "`".
> >
> > Many thanks for any suggestions and best wishes,
> > Ranjan
> >
>
> You haven't told what OS you are using, but with Windows OS, you can get
> the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
> press 0228 on the numeric keypad.
>
>

I am sorry, I use a linux operating system. I use Fedora 25 but the student I wanted to show this uses Ubuntu, though I don't know if the distribution matters.

Thanks again for your help, and best wishes,
Ranjan

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

David Winsemius

> On May 13, 2017, at 5:47 AM, Ranjan Maitra <[hidden email]> wrote:
>
> On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund <[hidden email]> wrote:
>
>> On 5/12/17 4:55 PM, Ranjan Maitra wrote:
>>> Hi,
>>>
>>> Is it possible to display double dot (umlaut) over a character such as would be possible using \ddot x in LaTeX? I can do this using tikzDevice but I wanted something simpler to point to.
>>>
>>> Here is an example of what I would like to do, but it is not quite there:
>>>
>>> require(ggplot2)
>>> data<-as.data.frame(c("a","b","c","a","b","c"))
>>> colnames(data)<-"Y"
>>> data$X<-c(1:6)
>>> data$Z<-c(1,2,3,1,2,3)
>>>
>>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) + xlab(expression(atop(top,bold(Age~"à"))))
>>>
>>> I would like to put in a double dot over the "a" in the x-axis instead of "`".
>>>
>>> Many thanks for any suggestions and best wishes,
>>> Ranjan
>>>
>>
>> You haven't told what OS you are using, but with Windows OS, you can get
>> the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
>> press 0228 on the numeric keypad.
>>
>>
>
> I am sorry, I use a linux operating system. I use Fedora 25 but the student I wanted to show this uses Ubuntu, though I don't know if the distribution matters.

On a Mac it is cmd-u followed by the vowel of your choice. Perhaps you should do a google search on the topic of getting umlauted characters for the distro of your choice?

David.


>
> Thanks again for your help, and best wishes,
> Ranjan
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

Berend Hasselman

> On 13 May 2017, at 20:10, David Winsemius <[hidden email]> wrote:
>
>>
>> On May 13, 2017, at 5:47 AM, Ranjan Maitra <[hidden email]> wrote:
>>
>> On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund <[hidden email]> wrote:
>>
>>> On 5/12/17 4:55 PM, Ranjan Maitra wrote:
>>>> Hi,
>>>>
>>>> Is it possible to display double dot (umlaut) over a character such as would be possible using \ddot x in LaTeX? I can do this using tikzDevice but I wanted something simpler to point to.
>>>>
>>>> Here is an example of what I would like to do, but it is not quite there:
>>>>
>>>> require(ggplot2)
>>>> data<-as.data.frame(c("a","b","c","a","b","c"))
>>>> colnames(data)<-"Y"
>>>> data$X<-c(1:6)
>>>> data$Z<-c(1,2,3,1,2,3)
>>>>
>>>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) + xlab(expression(atop(top,bold(Age~"à"))))
>>>>
>>>> I would like to put in a double dot over the "a" in the x-axis instead of "`".
>>>>
>>>> Many thanks for any suggestions and best wishes,
>>>> Ranjan
>>>>
>>>
>>> You haven't told what OS you are using, but with Windows OS, you can get
>>> the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
>>> press 0228 on the numeric keypad.
>>>
>>>
>>
>> I am sorry, I use a linux operating system. I use Fedora 25 but the student I wanted to show this uses Ubuntu, though I don't know if the distribution matters.
>
> On a Mac it is cmd-u followed by the vowel of your choice. Perhaps you should do a google search on the topic of getting umlauted characters for the distro of your choice?
>

Option u followed by vowel! If you haven't changed Modifier Keys.

Berend

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

Ranjan Maitra-3
On Sat, 13 May 2017 20:25:41 +0200 Berend Hasselman <[hidden email]> wrote:

>
> > On 13 May 2017, at 20:10, David Winsemius <[hidden email]> wrote:
> >
> >>
> >> On May 13, 2017, at 5:47 AM, Ranjan Maitra <[hidden email]> wrote:
> >>
> >> On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund <[hidden email]> wrote:
> >>
> >>> On 5/12/17 4:55 PM, Ranjan Maitra wrote:
> >>>> Hi,
> >>>>
> >>>> Is it possible to display double dot (umlaut) over a character such as would be possible using \ddot x in LaTeX? I can do this using tikzDevice but I wanted something simpler to point to.
> >>>>
> >>>> Here is an example of what I would like to do, but it is not quite there:
> >>>>
> >>>> require(ggplot2)
> >>>> data<-as.data.frame(c("a","b","c","a","b","c"))
> >>>> colnames(data)<-"Y"
> >>>> data$X<-c(1:6)
> >>>> data$Z<-c(1,2,3,1,2,3)
> >>>>
> >>>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) + xlab(expression(atop(top,bold(Age~"à"))))
> >>>>
> >>>> I would like to put in a double dot over the "a" in the x-axis instead of "`".
> >>>>
> >>>> Many thanks for any suggestions and best wishes,
> >>>> Ranjan
> >>>>
> >>>
> >>> You haven't told what OS you are using, but with Windows OS, you can get
> >>> the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
> >>> press 0228 on the numeric keypad.
> >>>
> >>>
> >>
> >> I am sorry, I use a linux operating system. I use Fedora 25 but the student I wanted to show this uses Ubuntu, though I don't know if the distribution matters.
> >
> > On a Mac it is cmd-u followed by the vowel of your choice. Perhaps you should do a google search on the topic of getting umlauted characters for the distro of your choice?
> >
>
> Option u followed by vowel! If you haven't changed Modifier Keys.

Thanks! I could not figure this out yet, butI was thinking: can I not use the ascii key (I guess it would be 0228) then? But how would I do this? Btw, I really would like to use omega  in an example but I figured that the usual way of writing Greek characters would work there.

I tried the following:

require(ggplot2)
data<-as.data.frame(c("a","b","c","a","b","c"))
colnames(data)<-"Y"
data$X<-c(1:6)
data$Z<-c(1,2,3,1,2,3)

ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) + xlab(expression(atop(top,bold(Age~"\0228"(omega)))))

but I do not get what I want. Looking around, it is not clear to me that I can get this to work. The ASCII codes that I saw were all specific to a letter with umlaut. I want \omega with the double dots (umlaut).

Thanks again!
Best wishes,
Ranjan

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: [FORGED] Re: display double dot over character in plotmath?

Rolf Turner
In reply to this post by David Winsemius
On 14/05/17 06:10, David Winsemius wrote:

>
>> On May 13, 2017, at 5:47 AM, Ranjan Maitra <[hidden email]> wrote:
>>
>> On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund <[hidden email]> wrote:
>>
>>> On 5/12/17 4:55 PM, Ranjan Maitra wrote:
>>>> Hi,
>>>>
>>>> Is it possible to display double dot (umlaut) over a character such as would be possible using \ddot x in LaTeX? I can do this using tikzDevice but I wanted something simpler to point to.
>>>>
>>>> Here is an example of what I would like to do, but it is not quite there:
>>>>
>>>> require(ggplot2)
>>>> data<-as.data.frame(c("a","b","c","a","b","c"))
>>>> colnames(data)<-"Y"
>>>> data$X<-c(1:6)
>>>> data$Z<-c(1,2,3,1,2,3)
>>>>
>>>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) + xlab(expression(atop(top,bold(Age~"à"))))
>>>>
>>>> I would like to put in a double dot over the "a" in the x-axis instead of "`".
>>>>
>>>> Many thanks for any suggestions and best wishes,
>>>> Ranjan
>>>>
>>>
>>> You haven't told what OS you are using, but with Windows OS, you can get
>>> the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
>>> press 0228 on the numeric keypad.
>>>
>>>
>>
>> I am sorry, I use a linux operating system. I use Fedora 25 but the student I wanted to show this uses Ubuntu, though I don't know if the distribution matters.
>
> On a Mac it is cmd-u followed by the vowel of your choice. Perhaps you should do a google search on the topic of getting umlauted characters for the distro of your choice?
>

Well, Linux is not Mac.  For which I am everlastingly thankful.

I believe the following works on both Fedora and Ubuntu:

(1) First add/set a "compose" key:

In my current system (Ubuntu 16.04.2; Mate Desktop 1.12.1) the sequence
of clicks is:

System -> Control Center -> Keyboard -> Layouts -> Options
        -> Position of Compose key -> [e.g.] Left Win

Clicking on "Left Win" inserts a tick mark in the little white box.  On
my keyboard the "Left Win" key is to the left of the "Alt" key, which is
to the left of the space bar.  It displays the (yeuchh!!!) Windoze
symbol, a distorted window in black and white.  This key is totally
useless for anything else, so one might as well use it for the compose key.

(2) Then do: <compose key> <letter> <accent>.  E.g

     ' <compose key> a " ' gives  ' ä '.

Note: Do *not* hold the compose key down while pressing the other
keys.  Press the compose key and release it; then press "a" (nothing
appears) then press ' " ' --- and bingo, ä appears.

HTH

cheers,

Rolf Turner

P. S.  Of course you just need to do the "set a compose key" bizzo
*once* and then it is set and works forever more.  Until you change or
bugger up your OS. :-)

R. T.

--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

Duncan Mackay-4
In reply to this post by Ranjan Maitra-3
Hi

I just had to do something similar in windows with \"{u}. Try Unicode symbol
- see ?plotmath

ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
xlab(expression(atop(top,bold(Age~"\u00e4"))))

Regards

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: [hidden email]

-----Original Message-----
From: R-help [mailto:[hidden email]] On Behalf Of Ranjan
Maitra
Sent: Saturday, 13 May 2017 22:48
To: [hidden email]
Subject: Re: [R] display double dot over character in plotmath?

On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund <[hidden email]>
wrote:

> On 5/12/17 4:55 PM, Ranjan Maitra wrote:
> > Hi,
> >
> > Is it possible to display double dot (umlaut) over a character such as
would be possible using \ddot x in LaTeX? I can do this using tikzDevice but
I wanted something simpler to point to.
> >
> > Here is an example of what I would like to do, but it is not quite
there:
> >
> > require(ggplot2)
> > data<-as.data.frame(c("a","b","c","a","b","c"))
> > colnames(data)<-"Y"
> > data$X<-c(1:6)
> > data$Z<-c(1,2,3,1,2,3)
> >
> > ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
xlab(expression(atop(top,bold(Age~"à"))))
> >
> > I would like to put in a double dot over the "a" in the x-axis instead
of "`".

> >
> > Many thanks for any suggestions and best wishes,
> > Ranjan
> >
>
> You haven't told what OS you are using, but with Windows OS, you can get
> the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
> press 0228 on the numeric keypad.
>
>

I am sorry, I use a linux operating system. I use Fedora 25 but the student
I wanted to show this uses Ubuntu, though I don't know if the distribution
matters.

Thanks again for your help, and best wishes,
Ranjan

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

Ranjan Maitra-3
Thanks, Duncan!

This works for the particular case and is, to my mind, a great solution!

However, I was wondering: is it possible to use these double dots with another character, such as omega?  

I apologize for changing the question somewhat, but I did not realize earlier that there were separate codes for putting double dots over different letters and I thought that figuring out the simpler question would be enough for me to figure out the next step.

Thanks again!

Best wishes,
Ranjan



On Sun, 14 May 2017 23:57:50 +1000 Duncan Mackay <[hidden email]> wrote:

> Hi
>
> I just had to do something similar in windows with \"{u}. Try Unicode symbol
> - see ?plotmath
>
> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
> xlab(expression(atop(top,bold(Age~"\u00e4"))))
>
> Regards
>
> Duncan
>
> Duncan Mackay
> Department of Agronomy and Soil Science
> University of New England
> Armidale NSW 2351
> Email: home: [hidden email]
>
> -----Original Message-----
> From: R-help [mailto:[hidden email]] On Behalf Of Ranjan
> Maitra
> Sent: Saturday, 13 May 2017 22:48
> To: [hidden email]
> Subject: Re: [R] display double dot over character in plotmath?
>
> On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund <[hidden email]>
> wrote:
>
> > On 5/12/17 4:55 PM, Ranjan Maitra wrote:
> > > Hi,
> > >
> > > Is it possible to display double dot (umlaut) over a character such as
> would be possible using \ddot x in LaTeX? I can do this using tikzDevice but
> I wanted something simpler to point to.
> > >
> > > Here is an example of what I would like to do, but it is not quite
> there:
> > >
> > > require(ggplot2)
> > > data<-as.data.frame(c("a","b","c","a","b","c"))
> > > colnames(data)<-"Y"
> > > data$X<-c(1:6)
> > > data$Z<-c(1,2,3,1,2,3)
> > >
> > > ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
> xlab(expression(atop(top,bold(Age~"à"))))
> > >
> > > I would like to put in a double dot over the "a" in the x-axis instead
> of "`".
> > >
> > > Many thanks for any suggestions and best wishes,
> > > Ranjan
> > >
> >
> > You haven't told what OS you are using, but with Windows OS, you can get
> > the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
> > press 0228 on the numeric keypad.
> >
> >
>
> I am sorry, I use a linux operating system. I use Fedora 25 but the student
> I wanted to show this uses Ubuntu, though I don't know if the distribution
> matters.
>
> Thanks again for your help, and best wishes,
> Ranjan
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


--
Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please respond to the mailing list if appropriate. For those needing to send personal or professional e-mail, please use appropriate addresses.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

David Winsemius

> On May 14, 2017, at 8:43 AM, Ranjan Maitra <[hidden email]> wrote:
>
> Thanks, Duncan!
>
> This works for the particular case and is, to my mind, a great solution!
>
> However, I was wondering: is it possible to use these double dots with another character, such as omega?  
>
> I apologize for changing the question somewhat, but I did not realize earlier that there were separate codes for putting double dots over different letters and I thought that figuring out the simpler question would be enough for me to figure out the next step.

I think you should be looking for a LaTeX solution. There is a tikzDevice-package.

This says you can assemble symbols with backspaces:

https://www.stat.berkeley.edu/~partha/symbols.pdf

For instance, LATEX defines \hbar (“~”) as a “¯” character (\mathchar’26) followed by a backspace of 9 math units (\mkern-9mu), followed by the letter “h”:

The second example in ?tikz, which could be a starting point for completing your task fails on my Mac by only displaying the names of the glyphs but not the glyphs themselves in the plot,  but it might have a better chance of succeeding on a Linux box.

Best;
David.


>
> Thanks again!
>
> Best wishes,
> Ranjan
>
>
>
> On Sun, 14 May 2017 23:57:50 +1000 Duncan Mackay <[hidden email]> wrote:
>
>> Hi
>>
>> I just had to do something similar in windows with \"{u}. Try Unicode symbol
>> - see ?plotmath
>>
>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
>> xlab(expression(atop(top,bold(Age~"\u00e4"))))
>>
>> Regards
>>
>> Duncan
>>
>> Duncan Mackay
>> Department of Agronomy and Soil Science
>> University of New England
>> Armidale NSW 2351
>> Email: home: [hidden email]
>>
>> -----Original Message-----
>> From: R-help [mailto:[hidden email]] On Behalf Of Ranjan
>> Maitra
>> Sent: Saturday, 13 May 2017 22:48
>> To: [hidden email]
>> Subject: Re: [R] display double dot over character in plotmath?
>>
>> On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund <[hidden email]>
>> wrote:
>>
>>> On 5/12/17 4:55 PM, Ranjan Maitra wrote:
>>>> Hi,
>>>>
>>>> Is it possible to display double dot (umlaut) over a character such as
>> would be possible using \ddot x in LaTeX? I can do this using tikzDevice but
>> I wanted something simpler to point to.
>>>>
>>>> Here is an example of what I would like to do, but it is not quite
>> there:
>>>>
>>>> require(ggplot2)
>>>> data<-as.data.frame(c("a","b","c","a","b","c"))
>>>> colnames(data)<-"Y"
>>>> data$X<-c(1:6)
>>>> data$Z<-c(1,2,3,1,2,3)
>>>>
>>>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
>> xlab(expression(atop(top,bold(Age~"à"))))
>>>>
>>>> I would like to put in a double dot over the "a" in the x-axis instead
>> of "`".
>>>>
>>>> Many thanks for any suggestions and best wishes,
>>>> Ranjan
>>>>
>>>
>>> You haven't told what OS you are using, but with Windows OS, you can get
>>> the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
>>> press 0228 on the numeric keypad.
>>>
>>>
>>
>> I am sorry, I use a linux operating system. I use Fedora 25 but the student
>> I wanted to show this uses Ubuntu, though I don't know if the distribution
>> matters.
>>
>> Thanks again for your help, and best wishes,
>> Ranjan
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>>
>
>
> --
> Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please respond to the mailing list if appropriate. For those needing to send personal or professional e-mail, please use appropriate addresses.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

Ranjan Maitra-3
On Sun, 14 May 2017 09:08:46 -0700 David Winsemius <[hidden email]> wrote:

>
> > On May 14, 2017, at 8:43 AM, Ranjan Maitra <[hidden email]> wrote:
> >
> > Thanks, Duncan!
> >
> > This works for the particular case and is, to my mind, a great solution!
> >
> > However, I was wondering: is it possible to use these double dots with another character, such as omega?  
> >
> > I apologize for changing the question somewhat, but I did not realize earlier that there were separate codes for putting double dots over different letters and I thought that figuring out the simpler question would be enough for me to figure out the next step.
>
> I think you should be looking for a LaTeX solution. There is a tikzDevice-package.
>
> This says you can assemble symbols with backspaces:
>
> https://www.stat.berkeley.edu/~partha/symbols.pdf
>
> For instance, LATEX defines \hbar (“~”) as a “¯” character (\mathchar’26) followed by a backspace of 9 math units (\mkern-9mu), followed by the letter “h”:
>
> The second example in ?tikz, which could be a starting point for completing your task fails on my Mac by only displaying the names of the glyphs but not the glyphs themselves in the plot,  but it might have a better chance of succeeding on a Linux box.


Thanks! I was trying to avoid using tikz but I guess that there may well be no other alternative.

Best wishes,
Ranjan

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

David Winsemius
In reply to this post by David Winsemius

> On May 14, 2017, at 9:08 AM, David Winsemius <[hidden email]> wrote:
>
>>
>> On May 14, 2017, at 8:43 AM, Ranjan Maitra <[hidden email]> wrote:
>>
>> Thanks, Duncan!
>>
>> This works for the particular case and is, to my mind, a great solution!
>>
>> However, I was wondering: is it possible to use these double dots with another character, such as omega?  
>>
>> I apologize for changing the question somewhat, but I did not realize earlier that there were separate codes for putting double dots over different letters and I thought that figuring out the simpler question would be enough for me to figure out the next step.
>
> I think you should be looking for a LaTeX solution. There is a tikzDevice-package.
>
> This says you can assemble symbols with backspaces:
>
> https://www.stat.berkeley.edu/~partha/symbols.pdf
>
> For instance, LATEX defines \hbar (“~”) as a “¯” character (\mathchar’26) followed by a backspace of 9 math units (\mkern-9mu), followed by the letter “h”:
>
> The second example in ?tikz, which could be a starting point for completing your task fails on my Mac by only displaying the names of the glyphs but not the glyphs themselves in the plot,  but it might have a better chance of succeeding on a Linux box.

I'm not having a lot of success finding a "naked umlaut" with which I can backspace to put above a capital \Omega but I found and answer on how to use Newtonian differentiation notation in LateX:

https://tex.stackexchange.com/questions/152951/how-to-write-two-dot-above-a-letter

So this now produces the desire results, thanks to Kirill Müller <[hidden email]>  tikzDevice package:

#-----------

library(tikzDevice)
options(tikzMetricPackages = c("\\usepackage[utf8]{inputenc}",
    "\\usepackage[T1]{fontenc}", "\\usetikzlibrary{calc}",
    "\\usepackage{amssymb}"))

tikz("formula.tex", width = 4, height = 4, standAlone = TRUE,
    packages = c("\\usepackage{tikz}",
                 "\\usepackage[active,tightpage,psfixbb]{preview}",
                 "\\PreviewEnvironment{pgfpicture}",
                 "\\setlength\\PreviewBorder{0pt}",
                 "\\usepackage{amssymb}"))
par(mar = c(4, 4, 1, 1))
plot(1, type = "n", xlab = "$x_1$", ylab = "$x_2$")
text(1, c(0.8), c("$\\ddot{\\Omega}$"), cex = 2.5)
dev.off()

tools::texi2pdf("formula.tex")
system(paste(getOption("pdfviewer"), "formula.pdf"))
#-----------


Best;
David.

>
> Best;
> David.
>
>
>>
>> Thanks again!
>>
>> Best wishes,
>> Ranjan
>>
>>
>>
>> On Sun, 14 May 2017 23:57:50 +1000 Duncan Mackay <[hidden email]> wrote:
>>
>>> Hi
>>>
>>> I just had to do something similar in windows with \"{u}. Try Unicode symbol
>>> - see ?plotmath
>>>
>>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
>>> xlab(expression(atop(top,bold(Age~"\u00e4"))))
>>>
>>> Regards
>>>
>>> Duncan
>>>
>>> Duncan Mackay
>>> Department of Agronomy and Soil Science
>>> University of New England
>>> Armidale NSW 2351
>>> Email: home: [hidden email]
>>>
>>> -----Original Message-----
>>> From: R-help [mailto:[hidden email]] On Behalf Of Ranjan
>>> Maitra
>>> Sent: Saturday, 13 May 2017 22:48
>>> To: [hidden email]
>>> Subject: Re: [R] display double dot over character in plotmath?
>>>
>>> On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund <[hidden email]>
>>> wrote:
>>>
>>>> On 5/12/17 4:55 PM, Ranjan Maitra wrote:
>>>>> Hi,
>>>>>
>>>>> Is it possible to display double dot (umlaut) over a character such as
>>> would be possible using \ddot x in LaTeX? I can do this using tikzDevice but
>>> I wanted something simpler to point to.
>>>>>
>>>>> Here is an example of what I would like to do, but it is not quite
>>> there:
>>>>>
>>>>> require(ggplot2)
>>>>> data<-as.data.frame(c("a","b","c","a","b","c"))
>>>>> colnames(data)<-"Y"
>>>>> data$X<-c(1:6)
>>>>> data$Z<-c(1,2,3,1,2,3)
>>>>>
>>>>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
>>> xlab(expression(atop(top,bold(Age~"à"))))
>>>>>
>>>>> I would like to put in a double dot over the "a" in the x-axis instead
>>> of "`".
>>>>>
>>>>> Many thanks for any suggestions and best wishes,
>>>>> Ranjan
>>>>>
>>>>
>>>> You haven't told what OS you are using, but with Windows OS, you can get
>>>> the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
>>>> press 0228 on the numeric keypad.
>>>>
>>>>
>>>
>>> I am sorry, I use a linux operating system. I use Fedora 25 but the student
>>> I wanted to show this uses Ubuntu, though I don't know if the distribution
>>> matters.
>>>
>>> Thanks again for your help, and best wishes,
>>> Ranjan
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> 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.
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> 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.
>>>
>>
>>
>> --
>> Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please respond to the mailing list if appropriate. For those needing to send personal or professional e-mail, please use appropriate addresses.
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>
> David Winsemius
> Alameda, CA, USA
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

David Winsemius

> On May 14, 2017, at 10:43 AM, David Winsemius <[hidden email]> wrote:
>
>
>> On May 14, 2017, at 9:08 AM, David Winsemius <[hidden email]> wrote:
>>
>>>
>>> On May 14, 2017, at 8:43 AM, Ranjan Maitra <[hidden email]> wrote:
>>>
>>> Thanks, Duncan!
>>>
>>> This works for the particular case and is, to my mind, a great solution!
>>>
>>> However, I was wondering: is it possible to use these double dots with another character, such as omega?  
>>>
>>> I apologize for changing the question somewhat, but I did not realize earlier that there were separate codes for putting double dots over different letters and I thought that figuring out the simpler question would be enough for me to figure out the next step.
>>
>> I think you should be looking for a LaTeX solution. There is a tikzDevice-package.
>>
>> This says you can assemble symbols with backspaces:
>>
>> https://www.stat.berkeley.edu/~partha/symbols.pdf
>>
>> For instance, LATEX defines \hbar (“~”) as a “¯” character (\mathchar’26) followed by a backspace of 9 math units (\mkern-9mu), followed by the letter “h”:
>>
>> The second example in ?tikz, which could be a starting point for completing your task fails on my Mac

And I got Example2 on the ?tikz page working on a mac but removing hte \\Large that I could not seem to get recognized  and the extra backslashes:

library(tikzDevice)
td <- tempdir()
tf <- file.path(td,'example2.tex')
oldwd <- getwd()
setwd(td)
syms <-c('alpha','theta','tau','beta','vartheta','pi','upsilon',
         'gamma','gamma','varpi','phi','delta','kappa','rho',
         'varphi','epsilon','lambda','varrho','chi','varepsilon',
         'mu','sigma','psi','zeta','nu','varsigma','omega','eta',
         'xi','Gamma','Lambda','Sigma','Psi','Delta','Xi','Upsilon',
         'Omega','Theta','Pi','Phi')
x <- rnorm(length(syms))
y <- rnorm(length(syms))

tikz(tf,standAlone=TRUE)
  plot(-2:2, -2:2, type = "n", axes=F,
      xlab='', ylab='', main='TikZ Device Math Example')
    text(x,y,paste("$\\",syms, "$", sep=""), cex=3)
dev.off()
tools::texi2dvi(tf,pdf=TRUE)
system(paste(getOption('pdfviewer'),file.path(td,'example2.pdf')))
setwd(oldwd)


>> by only displaying the names of the glyphs but not the glyphs themselves in the plot,  but it might have a better chance of succeeding on a Linux box.
>
> I'm not having a lot of success finding a "naked umlaut" with which I can backspace to put above a capital \Omega but I found and answer on how to use Newtonian differentiation notation in LateX:
>
> https://tex.stackexchange.com/questions/152951/how-to-write-two-dot-above-a-letter



 Thanks (amended) to Kirill Müller <[hidden email]> and Charlie Sharpsteen, Cameron Bracken, and Yihue Xie for the tikzDevice package:

--
David.

>
> #-----------
>
> library(tikzDevice)
> options(tikzMetricPackages = c("\\usepackage[utf8]{inputenc}",
>    "\\usepackage[T1]{fontenc}", "\\usetikzlibrary{calc}",
>    "\\usepackage{amssymb}"))
>
> tikz("formula.tex", width = 4, height = 4, standAlone = TRUE,
>    packages = c("\\usepackage{tikz}",
>                 "\\usepackage[active,tightpage,psfixbb]{preview}",
>                 "\\PreviewEnvironment{pgfpicture}",
>                 "\\setlength\\PreviewBorder{0pt}",
>                 "\\usepackage{amssymb}"))
> par(mar = c(4, 4, 1, 1))
> plot(1, type = "n", xlab = "$x_1$", ylab = "$x_2$")
> text(1, c(0.8), c("$\\ddot{\\Omega}$"), cex = 2.5)
> dev.off()
>
> tools::texi2pdf("formula.tex")
> system(paste(getOption("pdfviewer"), "formula.pdf"))
> #-----------
>
>
> Best;
> David.
>>
>> Best;
>> David.
>>
>>
>>>
>>> Thanks again!
>>>
>>> Best wishes,
>>> Ranjan
>>>
>>>
>>>
>>> On Sun, 14 May 2017 23:57:50 +1000 Duncan Mackay <[hidden email]> wrote:
>>>
>>>> Hi
>>>>
>>>> I just had to do something similar in windows with \"{u}. Try Unicode symbol
>>>> - see ?plotmath
>>>>
>>>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
>>>> xlab(expression(atop(top,bold(Age~"\u00e4"))))
>>>>
>>>> Regards
>>>>
>>>> Duncan
>>>>
>>>> Duncan Mackay
>>>> Department of Agronomy and Soil Science
>>>> University of New England
>>>> Armidale NSW 2351
>>>> Email: home: [hidden email]
>>>>
>>>> -----Original Message-----
>>>> From: R-help [mailto:[hidden email]] On Behalf Of Ranjan
>>>> Maitra
>>>> Sent: Saturday, 13 May 2017 22:48
>>>> To: [hidden email]
>>>> Subject: Re: [R] display double dot over character in plotmath?
>>>>
>>>> On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund <[hidden email]>
>>>> wrote:
>>>>
>>>>> On 5/12/17 4:55 PM, Ranjan Maitra wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Is it possible to display double dot (umlaut) over a character such as
>>>> would be possible using \ddot x in LaTeX? I can do this using tikzDevice but
>>>> I wanted something simpler to point to.
>>>>>>
>>>>>> Here is an example of what I would like to do, but it is not quite
>>>> there:
>>>>>>
>>>>>> require(ggplot2)
>>>>>> data<-as.data.frame(c("a","b","c","a","b","c"))
>>>>>> colnames(data)<-"Y"
>>>>>> data$X<-c(1:6)
>>>>>> data$Z<-c(1,2,3,1,2,3)
>>>>>>
>>>>>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
>>>> xlab(expression(atop(top,bold(Age~"à"))))
>>>>>>
>>>>>> I would like to put in a double dot over the "a" in the x-axis instead
>>>> of "`".
>>>>>>
>>>>>> Many thanks for any suggestions and best wishes,
>>>>>> Ranjan
>>>>>>
>>>>>
>>>>> You haven't told what OS you are using, but with Windows OS, you can get
>>>>> the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
>>>>> press 0228 on the numeric keypad.
>>>>>
>>>>>
>>>>
>>>> I am sorry, I use a linux operating system. I use Fedora 25 but the student
>>>> I wanted to show this uses Ubuntu, though I don't know if the distribution
>>>> matters.
>>>>
>>>> Thanks again for your help, and best wishes,
>>>> Ranjan
>>>>
>>>> ______________________________________________
>>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>>> 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.
>>>>
>>>> ______________________________________________
>>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>>> 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.
>>>>
>>>
>>>
>>> --
>>> Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please respond to the mailing list if appropriate. For those needing to send personal or professional e-mail, please use appropriate addresses.
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> 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.
>>
>> David Winsemius
>> Alameda, CA, USA
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>
> David Winsemius
> Alameda, CA, USA
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

Robert Baer
In reply to this post by Ranjan Maitra-3
I got this but the spacing is all wrong and plotmath() seems to have no
way to do kernning or overprinting.  I'm surprised Paul didn't
generalize the hat()-type functionality.

ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
   xlab(expression(atop("\U0308",Omega)))

ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
   xlab(expression(atop("\U0308",omega)))


On 5/14/2017 11:18 AM, Ranjan Maitra wrote:

> On Sun, 14 May 2017 09:08:46 -0700 David Winsemius <[hidden email]> wrote:
>
>>> On May 14, 2017, at 8:43 AM, Ranjan Maitra <[hidden email]> wrote:
>>>
>>> Thanks, Duncan!
>>>
>>> This works for the particular case and is, to my mind, a great solution!
>>>
>>> However, I was wondering: is it possible to use these double dots with another character, such as omega?
>>>
>>> I apologize for changing the question somewhat, but I did not realize earlier that there were separate codes for putting double dots over different letters and I thought that figuring out the simpler question would be enough for me to figure out the next step.
>> I think you should be looking for a LaTeX solution. There is a tikzDevice-package.
>>
>> This says you can assemble symbols with backspaces:
>>
>> https://www.stat.berkeley.edu/~partha/symbols.pdf
>>
>> For instance, LATEX defines \hbar (“~”) as a “¯” character (\mathchar’26) followed by a backspace of 9 math units (\mkern-9mu), followed by the letter “h”:
>>
>> The second example in ?tikz, which could be a starting point for completing your task fails on my Mac by only displaying the names of the glyphs but not the glyphs themselves in the plot,  but it might have a better chance of succeeding on a Linux box.
>
> Thanks! I was trying to avoid using tikz but I guess that there may well be no other alternative.
>
> Best wishes,
> Ranjan
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

Duncan Mackay-4
In reply to this post by Ranjan Maitra-3
Hi

I looked up for the Unicode version at
http://www.utf8-chartable.de/unicode-utf8-table.pl
You might have to go to another page to find the Unicode equivalent.

You may not be able to get the right character showing  and get at square/s
instead - it all depends on the drivers and how many characters that make up
the Unicode character
I had a case of this recently and it did not make any difference using Cairo


Regards

Duncan

 

-----Original Message-----
From: R-help [mailto:[hidden email]] On Behalf Of Ranjan
Maitra
Sent: Monday, 15 May 2017 01:44
To: [hidden email]
Subject: Re: [R] display double dot over character in plotmath?

Thanks, Duncan!

This works for the particular case and is, to my mind, a great solution!

However, I was wondering: is it possible to use these double dots with
another character, such as omega?  

I apologize for changing the question somewhat, but I did not realize
earlier that there were separate codes for putting double dots over
different letters and I thought that figuring out the simpler question would
be enough for me to figure out the next step.

Thanks again!

Best wishes,
Ranjan



On Sun, 14 May 2017 23:57:50 +1000 Duncan Mackay <[hidden email]>
wrote:

> Hi
>
> I just had to do something similar in windows with \"{u}. Try Unicode
symbol

> - see ?plotmath
>
> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
> xlab(expression(atop(top,bold(Age~"\u00e4"))))
>
> Regards
>
> Duncan
>
> Duncan Mackay
> Department of Agronomy and Soil Science
> University of New England
> Armidale NSW 2351
> Email: home: [hidden email]
>
> -----Original Message-----
> From: R-help [mailto:[hidden email]] On Behalf Of Ranjan
> Maitra
> Sent: Saturday, 13 May 2017 22:48
> To: [hidden email]
> Subject: Re: [R] display double dot over character in plotmath?
>
> On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund <[hidden email]>
> wrote:
>
> > On 5/12/17 4:55 PM, Ranjan Maitra wrote:
> > > Hi,
> > >
> > > Is it possible to display double dot (umlaut) over a character such as
> would be possible using \ddot x in LaTeX? I can do this using tikzDevice
but

> I wanted something simpler to point to.
> > >
> > > Here is an example of what I would like to do, but it is not quite
> there:
> > >
> > > require(ggplot2)
> > > data<-as.data.frame(c("a","b","c","a","b","c"))
> > > colnames(data)<-"Y"
> > > data$X<-c(1:6)
> > > data$Z<-c(1,2,3,1,2,3)
> > >
> > > ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
> xlab(expression(atop(top,bold(Age~"à"))))
> > >
> > > I would like to put in a double dot over the "a" in the x-axis instead
> of "`".
> > >
> > > Many thanks for any suggestions and best wishes,
> > > Ranjan
> > >
> >
> > You haven't told what OS you are using, but with Windows OS, you can get

> > the 'ä' by making sure the NUMLOCK key is on, hold down the alt key and
> > press 0228 on the numeric keypad.
> >
> >
>
> I am sorry, I use a linux operating system. I use Fedora 25 but the
student

> I wanted to show this uses Ubuntu, though I don't know if the distribution
> matters.
>
> Thanks again for your help, and best wishes,
> Ranjan
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


--
Important Notice: This mailbox is ignored: e-mails are set to be deleted on
receipt. Please respond to the mailing list if appropriate. For those
needing to send personal or professional e-mail, please use appropriate
addresses.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

Olivier Crouzet-2
In reply to this post by Ranjan Maitra-3
Hi,

The following simple solution gives appropriate results in base R (and
should work with any base character):

plot(rnorm(100), rnorm(100), main = expression(paste(omega, "\u0308")))

In your ggplot example, something like:

ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) + xlab
(expression(atop(top, bold(Age~paste(omega,"\u0308")))))

seems to produce what you need (AFAICT).

Note that, contrary to Robert's examples, one has to put
the corresponding diacritic AFTER the base character in unicode
conventions. Also, one needs to put the omega and "\u0308" within a
paste() function in order to concatenate them correctly and to reach a
state in which they "combine" together.

Inserting this into your own code, the characters are not bold though
and I'm not sure what the solution would be. This may be an issue with
the font that is used. Also note that in order to export the graph to
pdf, you'd need to use cairo_pdf() in order to get the character
displayed correctly.

Olivier.


On Sun, 14 May 2017 10:43:40 -0500
Ranjan Maitra <[hidden email]> wrote:

> Thanks, Duncan!
>
> This works for the particular case and is, to my mind, a great
> solution!
>
> However, I was wondering: is it possible to use these double dots
> with another character, such as omega?  
>
> I apologize for changing the question somewhat, but I did not realize
> earlier that there were separate codes for putting double dots over
> different letters and I thought that figuring out the simpler
> question would be enough for me to figure out the next step.
>
> Thanks again!
>
> Best wishes,
> Ranjan
>
>
>
> On Sun, 14 May 2017 23:57:50 +1000 Duncan Mackay
> <[hidden email]> wrote:
>
> > Hi
> >
> > I just had to do something similar in windows with \"{u}. Try
> > Unicode symbol
> > - see ?plotmath
> >
> > ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
> > xlab(expression(atop(top,bold(Age~"\u00e4"))))
> >
> > Regards
> >
> > Duncan
> >
> > Duncan Mackay
> > Department of Agronomy and Soil Science
> > University of New England
> > Armidale NSW 2351
> > Email: home: [hidden email]
> >
> > -----Original Message-----
> > From: R-help [mailto:[hidden email]] On Behalf Of
> > Ranjan Maitra
> > Sent: Saturday, 13 May 2017 22:48
> > To: [hidden email]
> > Subject: Re: [R] display double dot over character in plotmath?
> >
> > On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund
> > <[hidden email]> wrote:
> >
> > > On 5/12/17 4:55 PM, Ranjan Maitra wrote:
> > > > Hi,
> > > >
> > > > Is it possible to display double dot (umlaut) over a character
> > > > such as
> > would be possible using \ddot x in LaTeX? I can do this using
> > tikzDevice but I wanted something simpler to point to.
> > > >
> > > > Here is an example of what I would like to do, but it is not
> > > > quite
> > there:
> > > >
> > > > require(ggplot2)
> > > > data<-as.data.frame(c("a","b","c","a","b","c"))
> > > > colnames(data)<-"Y"
> > > > data$X<-c(1:6)
> > > > data$Z<-c(1,2,3,1,2,3)
> > > >
> > > > ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
> > xlab(expression(atop(top,bold(Age~"à"))))
> > > >
> > > > I would like to put in a double dot over the "a" in the x-axis
> > > > instead
> > of "`".
> > > >
> > > > Many thanks for any suggestions and best wishes,
> > > > Ranjan
> > > >
> > >
> > > You haven't told what OS you are using, but with Windows OS, you
> > > can get the 'ä' by making sure the NUMLOCK key is on, hold down
> > > the alt key and press 0228 on the numeric keypad.
> > >
> > >
> >
> > I am sorry, I use a linux operating system. I use Fedora 25 but the
> > student I wanted to show this uses Ubuntu, though I don't know if
> > the distribution matters.
> >
> > Thanks again for your help, and best wishes,
> > Ranjan
> >
> > ______________________________________________
> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > 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.
> >
> > ______________________________________________
> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > 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.
> >
>
>
> --
> Important Notice: This mailbox is ignored: e-mails are set to be
> deleted on receipt. Please respond to the mailing list if
> appropriate. For those needing to send personal or professional
> e-mail, please use appropriate addresses.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.


--
  Olivier Crouzet, PhD
  /Assistant Professor/
  @LLING - Laboratoire de Linguistique de Nantes
    UMR6310 CNRS / Université de Nantes
  /Guest Researcher/
  @UMCG (University Medical Center Groningen)
    ENT department
    Reijksuniversiteit Groningen

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: display double dot over character in plotmath?

Duncan Murdoch-2
On 15/05/2017 8:18 AM, Olivier Crouzet wrote:
> Hi,
>
> The following simple solution gives appropriate results in base R (and
> should work with any base character):
>
> plot(rnorm(100), rnorm(100), main = expression(paste(omega, "\u0308")))

It doesn't work for me on Mac OS or Windows 10 in the default device or
pdf().  The trouble with Unicode solutions is that R graphics devices
aren't required to support it.

Duncan Murdoch

>
> In your ggplot example, something like:
>
> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) + xlab
> (expression(atop(top, bold(Age~paste(omega,"\u0308")))))
>
> seems to produce what you need (AFAICT).
>
> Note that, contrary to Robert's examples, one has to put
> the corresponding diacritic AFTER the base character in unicode
> conventions. Also, one needs to put the omega and "\u0308" within a
> paste() function in order to concatenate them correctly and to reach a
> state in which they "combine" together.
>
> Inserting this into your own code, the characters are not bold though
> and I'm not sure what the solution would be. This may be an issue with
> the font that is used. Also note that in order to export the graph to
> pdf, you'd need to use cairo_pdf() in order to get the character
> displayed correctly.
>
> Olivier.
>
>
> On Sun, 14 May 2017 10:43:40 -0500
> Ranjan Maitra <[hidden email]> wrote:
>
>> Thanks, Duncan!
>>
>> This works for the particular case and is, to my mind, a great
>> solution!
>>
>> However, I was wondering: is it possible to use these double dots
>> with another character, such as omega?
>>
>> I apologize for changing the question somewhat, but I did not realize
>> earlier that there were separate codes for putting double dots over
>> different letters and I thought that figuring out the simpler
>> question would be enough for me to figure out the next step.
>>
>> Thanks again!
>>
>> Best wishes,
>> Ranjan
>>
>>
>>
>> On Sun, 14 May 2017 23:57:50 +1000 Duncan Mackay
>> <[hidden email]> wrote:
>>
>>> Hi
>>>
>>> I just had to do something similar in windows with \"{u}. Try
>>> Unicode symbol
>>> - see ?plotmath
>>>
>>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
>>> xlab(expression(atop(top,bold(Age~"\u00e4"))))
>>>
>>> Regards
>>>
>>> Duncan
>>>
>>> Duncan Mackay
>>> Department of Agronomy and Soil Science
>>> University of New England
>>> Armidale NSW 2351
>>> Email: home: [hidden email]
>>>
>>> -----Original Message-----
>>> From: R-help [mailto:[hidden email]] On Behalf Of
>>> Ranjan Maitra
>>> Sent: Saturday, 13 May 2017 22:48
>>> To: [hidden email]
>>> Subject: Re: [R] display double dot over character in plotmath?
>>>
>>> On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund
>>> <[hidden email]> wrote:
>>>
>>>> On 5/12/17 4:55 PM, Ranjan Maitra wrote:
>>>>> Hi,
>>>>>
>>>>> Is it possible to display double dot (umlaut) over a character
>>>>> such as
>>> would be possible using \ddot x in LaTeX? I can do this using
>>> tikzDevice but I wanted something simpler to point to.
>>>>>
>>>>> Here is an example of what I would like to do, but it is not
>>>>> quite
>>> there:
>>>>>
>>>>> require(ggplot2)
>>>>> data<-as.data.frame(c("a","b","c","a","b","c"))
>>>>> colnames(data)<-"Y"
>>>>> data$X<-c(1:6)
>>>>> data$Z<-c(1,2,3,1,2,3)
>>>>>
>>>>> ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) +
>>> xlab(expression(atop(top,bold(Age~"à"))))
>>>>>
>>>>> I would like to put in a double dot over the "a" in the x-axis
>>>>> instead
>>> of "`".
>>>>>
>>>>> Many thanks for any suggestions and best wishes,
>>>>> Ranjan
>>>>>
>>>>
>>>> You haven't told what OS you are using, but with Windows OS, you
>>>> can get the 'ä' by making sure the NUMLOCK key is on, hold down
>>>> the alt key and press 0228 on the numeric keypad.
>>>>
>>>>
>>>
>>> I am sorry, I use a linux operating system. I use Fedora 25 but the
>>> student I wanted to show this uses Ubuntu, though I don't know if
>>> the distribution matters.
>>>
>>> Thanks again for your help, and best wishes,
>>> Ranjan
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> 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.
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> 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.
>>>
>>
>>
>> --
>> Important Notice: This mailbox is ignored: e-mails are set to be
>> deleted on receipt. Please respond to the mailing list if
>> appropriate. For those needing to send personal or professional
>> e-mail, please use appropriate addresses.
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.