Skip to content

degree sign

1 message · Cathy Lee Gierke

#
My actual plot call is long and complicated, so I tried to simplify it in
the last message.....here is the actual, using David's proposed solution.
It is not working.   What I want to see printed is the following (with
degree symbols after 73 and 296).  Since I reuse this string in various
ways, I would like to build a variable to hold it that I can plug into
plots when needed:


*Hours from Reference Time: 201302060000 Model span = 24.00 hrs     o ?73
  b ?296*

So I set xlab=printXlab value with David's solution, below, in the plot
(this is the actual printXlab value, instead of the simplified one):


* xl = bquote( .(Orthophase[i,j] )*degree )**printXlab<-paste("Hours from
Reference Time:",RefTimeString,"Model span
=",format(magDt,digits=3,nsmall=2),"hrs    o",Orthophase[i,j],xl,"
b",Bathyphase[i,j])  *

and here is the result I get (weird duplicates....but most importantly, no
degree symbol:

Hours from Reference Time: 201302060000 Model span = 24.00 hrs o ?73 *
Hours from Reference Time: 201302060000 Model span = 24.00 hrs o ?73 ?73
Hours from Reference Time: 201302060000 Model span = 24.00 hrs o ?73 degree

b ?296 b ?296

b ?296
----------------------
So, I tried to set xlab as Uwe's proposal (without paste, and without
commas):
printXlab<-expression("Hours from Reference Time:" RefTimeString "Model
span =" format(magDt,digits=3,nsmall=2) "hrs    o" * Orthophase[i,j] *
degree"     b"* Bathyphase[i,j] * degree)     #  degree~C

I get "unexpected symbol at ^RefTimeStrng" so it doesn't like the missing
commas.

Then I try it with commas, except around the degree parts:
printXlab<-expression("Hours from Reference Time:" RefTimeString "Model
span =" format(magDt,digits=3,nsmall=2) "hrs    o" * Orthophase[i,j] *
degree"     b"* Bathyphase[i,j] * degree)     #  degree~C

It runs, but here is what prints:

Hours from Reference Time:
?Then I try with all commas replaced by *:
printXlab<-expression("Hours from Reference Time:"* RefTimeString *"Model
span =" * format(magDt,digits=3,nsmall=2) * "hrs    o" * Orthophase[i,j] *
degree * "     b"* Bathyphase[i,j] * degree * " ")     #  degree~C

?And I get degree signs (sort of)!!  But the rest is wrong. The variables
are not evaluated:

Hours from Reference Time:RefTimeStringModel span =format(magDt, 3, 2)hrs
oOrthophasei? bBathyphasei?
?I don't really understand what state is required for the degrees to
print....?

Cathy Lee Gierke

*"We are what we repeatedly do.  Excellence, then, is not an act, but a
habit." Aristotle*

On Sat, Mar 19, 2016 at 2:04 AM, David Winsemius <dwinsemius at comcast.net>
wrote: