Re: [R] Degree symbol as axis label superscript [RESOLVED]

2021-12-01 Thread Rich Shepard

On Tue, 30 Nov 2021, David Winsemius wrote:


There's nothing special about following a digit. You can have it follow
anything. Since you were going to need to quote the parentheses anywa,
then have it superscripted above the level of the paren:
plot(1,1, ylab = expression(Temperature~"("^degree*C*")")   )


Thank you, David. I tried something like that missed the correct quoting.

Regards,

Rich

__
R-help@r-project.org 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.


Re: [R] Degree symbol as axis label superscript [RESOLVED]

2021-11-30 Thread David Winsemius



On 11/30/21 1:22 PM, Rich Shepard wrote:

On Tue, 30 Nov 2021, David Winsemius wrote:


Really? What was wrong with this?
plot(1, 1, xlab=expression(32^degree) )  # the example given on 
?plotmath


David,

Absolutely nothing. When there's no specific degree value in the label
because the axis represents a range of values there's no digit preceeding
the ^ symbol.

The axis label is 'Temperature (oC)' with the degree symbol preceeding a
character, not following a specific digit.



There's nothing special about following a digit. You can have it follow 
anything. Since you were going to need to quote the parentheses anywa, 
then have it superscripted above the level of the paren:



plot(1,1, ylab = expression(Temperature~"("^degree*C*")")   )

--

David.



Rich

__
R-help@r-project.org 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.


__
R-help@r-project.org 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.


Re: [R] Degree symbol as axis label superscript [RESOLVED]

2021-11-30 Thread Rich Shepard

On Tue, 30 Nov 2021, David Winsemius wrote:


Really? What was wrong with this?
plot(1, 1, xlab=expression(32^degree) )  # the example given on ?plotmath


David,

Absolutely nothing. When there's no specific degree value in the label
because the axis represents a range of values there's no digit preceeding
the ^ symbol.

The axis label is 'Temperature (oC)' with the degree symbol preceeding a
character, not following a specific digit.

Rich

__
R-help@r-project.org 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.


Re: [R] Degree symbol as axis label superscript [RESOLVED]

2021-11-30 Thread Rich Shepard

On Tue, 30 Nov 2021, Bill Dunlap wrote:


The following makes degree signs appropriately, as shown in ?plotmath:
   plot(68, 20, xlab=expression(degree*F), ylab=expression(degree*C))
If you want the word "degree" spelled out, put it in quotes.


Bill,

I missed that last point; thought it was always spelled out.

Thanks,

Rich

__
R-help@r-project.org 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.


Re: [R] Degree symbol as axis label superscript [RESOLVED]

2021-11-30 Thread Bill Dunlap
The following makes degree signs appropriately, as shown in ?plotmath:
plot(68, 20, xlab=expression(degree*F), ylab=expression(degree*C))
If you want the word "degree" spelled out, put it in quotes.

-Bill

On Tue, Nov 30, 2021 at 12:31 PM Rich Shepard 
wrote:

> On Tue, 30 Nov 2021, Rich Shepard wrote:
>
> > Thanks, Andrew. I will.
>
> plotmath didn't have the solution; the use of the LaTeX ^ for a superscript
> had a character or number preceeding it. Using 'degree' prints that string
> on the axis.
>
> What does work is using the unicode for the degree symbol as prefix to
> either C or F. In my case:
> ylab('Water Temperature (\u00B0C)')
> does the job.
>
> I found this solution with the DDG search string, 'degree symbol in R plot
> axis label'. This stackexchange thread has the answer:
> <
> https://stackoverflow.com/questions/51799118/writing-the-symbol-degrees-celsius-in-axis-titles-with-r-plotly
> >
>
> Regards,
>
> Rich
>
> __
> R-help@r-project.org 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.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] Degree symbol as axis label superscript [RESOLVED]

2021-11-30 Thread David Winsemius



On 11/30/21 12:29 PM, Rich Shepard wrote:

On Tue, 30 Nov 2021, Rich Shepard wrote:


Thanks, Andrew. I will.


plotmath didn't have the solution; 



Really? What was wrong with this?


plot(1, 1, xlab=expression(32^degree) )  # the example given on ?plotmath


--

David.




the use of the LaTeX ^ for a superscript
had a character or number preceeding it. Using 'degree' prints that 
string

on the axis.

What does work is using the unicode for the degree symbol as prefix to
either C or F. In my case:
ylab('Water Temperature (\u00B0C)')
does the job.

I found this solution with the DDG search string, 'degree symbol in R 
plot

axis label'. This stackexchange thread has the answer:
 



Regards,

Rich

__
R-help@r-project.org 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.


__
R-help@r-project.org 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.


Re: [R] Degree symbol as axis label superscript [RESOLVED]

2021-11-30 Thread Andrew Simmons
I think you have to not put the word degree in quotes, something like:


graphics::plot(
x = 1,

xlab = quote(
32 * degree
)
)


works for me, though yours seems like a good solution too

On Tue, Nov 30, 2021 at 3:31 PM Rich Shepard 
wrote:

> On Tue, 30 Nov 2021, Rich Shepard wrote:
>
> > Thanks, Andrew. I will.
>
> plotmath didn't have the solution; the use of the LaTeX ^ for a superscript
> had a character or number preceeding it. Using 'degree' prints that string
> on the axis.
>
> What does work is using the unicode for the degree symbol as prefix to
> either C or F. In my case:
> ylab('Water Temperature (\u00B0C)')
> does the job.
>
> I found this solution with the DDG search string, 'degree symbol in R plot
> axis label'. This stackexchange thread has the answer:
> <
> https://stackoverflow.com/questions/51799118/writing-the-symbol-degrees-celsius-in-axis-titles-with-r-plotly
> >
>
> Regards,
>
> Rich
>
> __
> R-help@r-project.org 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.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] Degree symbol as axis label superscript [RESOLVED]

2021-11-30 Thread Rich Shepard

On Tue, 30 Nov 2021, Rich Shepard wrote:


Thanks, Andrew. I will.


plotmath didn't have the solution; the use of the LaTeX ^ for a superscript
had a character or number preceeding it. Using 'degree' prints that string
on the axis.

What does work is using the unicode for the degree symbol as prefix to
either C or F. In my case:
ylab('Water Temperature (\u00B0C)')
does the job.

I found this solution with the DDG search string, 'degree symbol in R plot
axis label'. This stackexchange thread has the answer:


Regards,

Rich

__
R-help@r-project.org 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.