[R] Plot degree symbol by itself

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Mar 29 10:36:54 CEST 2007


Andre Jung wrote:
> Dear all,
>
> I'm trying to plot the degree symbol by itself between two square
> brackets. I just want to have "K [°]". So far I got to:
>
> expression(K ~ group("[",1*degree,"]"))
> or
> expression(K ~ group("[",1^o,"]"))
>
> But it won't work without a number or letter.
>
> Any suggestions?
>
>   
An empty pair of braces usually works:

plot(0)
text(1,1,expression(K ~ group("[",{}*degree,"]")))

(or {}^degree, but that looks odd -- degree is already a raised symbol)

But whatever was wrong with just
 
text(1.2,1,expression(K ~ group("[",degree,"]")))

??
> Thanks,
> andre
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>



More information about the R-help mailing list