comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: special characters in iTools annotation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: special characters in iTools annotation [message #58072] Wed, 16 January 2008 09:22 Go to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
How about pasting in the micro symbol?

123×10!u5!n µ

Then it seems to work with isolatin1=true. The only problem is that it
doesn't use the symbol font, so it looks a bit different.

I was able to see the micro character by doing the following:
print,string(bindgen(128)+128b)

-Chris
Re: special characters in iTools annotation [message #58083 is a reply to message #58072] Tue, 15 January 2008 17:16 Go to previous messageGo to next message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
Benjamin Hornberger wrote:
> Chris Torrence wrote:
>> Well, I just did the following at the IDL command line:
>> print, string(byte("327))
>>
>> This printed out the little times character in the output log.
>>
>> Then, I created my iTools annotation, and double-clicked to bring up
>> the property sheet. Then I just copied and pasted that character into
>> the text field. My final string ended up looking like:
>> 123�10!u5
>>
>> with the nice times sign, plus some exponential notation for bonus
>> points.
>>
>> Does this help?
>
> Indeed it does. Thanks so much!
>
> Benjamin

Well, yes, I have the character in my iTool now. But I also have a
"micro" symbol in there (using "!mm" in the annotation). Now if I export
the plot to EPS, I have either the "times" but not the micro in there
(when setting isolatin1 = true), or vice versa (isolatin1 = false).

I guess I'm giving up and fixing my labels in Illustrator. That always
works (while blowing up the file size by a factor of 50).

Cheers,
Benjamin
Re: special characters in iTools annotation [message #58086 is a reply to message #58083] Tue, 15 January 2008 14:21 Go to previous messageGo to next message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
Chris Torrence wrote:
> Well, I just did the following at the IDL command line:
> print, string(byte("327))
>
> This printed out the little times character in the output log.
>
> Then, I created my iTools annotation, and double-clicked to bring up
> the property sheet. Then I just copied and pasted that character into
> the text field. My final string ended up looking like:
> 123�10!u5
>
> with the nice times sign, plus some exponential notation for bonus
> points.
>
> Does this help?

Indeed it does. Thanks so much!

Benjamin
Re: special characters in iTools annotation [message #58087 is a reply to message #58086] Tue, 15 January 2008 13:32 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
Well, I just did the following at the IDL command line:
print, string(byte("327))

This printed out the little times character in the output log.

Then, I created my iTools annotation, and double-clicked to bring up
the property sheet. Then I just copied and pasted that character into
the text field. My final string ended up looking like:
123×10!u5

with the nice times sign, plus some exponential notation for bonus
points.

Does this help?

-Chris
ITTVIS
Re: special characters in iTools annotation [message #58091 is a reply to message #58087] Tue, 15 January 2008 11:15 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Benjamin Hornberger writes:

> Yes, I've used that before. However, in that case the special character
> is part of the symbol font and corresponds to the letter "e" in the
> normal font (Helvetica). In my case, the special character is in the
> Helvetica font already, so I shouldn't even have to change fonts, but I
> just don't know how to produce that character (since the keyboard
> doesn't have a key for it) ...
>
> What would probably work is to find the identifier of that annotation
> and modify it programmatically (from the command line) using the
> string() function. But it would be nice if there was an easy thing I
> could type into the property sheet.

Sorry, this came in after I responded to you.

Well, "nice" and "easy" and "iTools" are three words you
don't often see in the same sentence! ;-)

I would think there is only the hard way here. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: special characters in iTools annotation [message #58092 is a reply to message #58091] Tue, 15 January 2008 11:11 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Benjamin Hornberger writes:

> Yes, but this is direct graphics. Also it uses the string() function,
> which I know how to use one the command line / programmatically, but I
> don't know how to use it in the graphical interface of iTools. If I just
> type string(), the string "string()" is added in my annotation ...

You need to know what the "string" value of your octal
number is. In the case of the epsilon:

IDL> print, string("145B)
e

So, that is why I can insert !9e!x into the title
string and get it to show up as an epsilon on the
display.

I presume you could do this programmatically, although
I don't have a clue how, by fishing out your axis or
font object (whatever you are trying to change) and
getting the text, manipulating that (you *could* use
your STRING() function now), and putting it back.
I just showed you how to do it with the property sheets.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: special characters in iTools annotation [message #58093 is a reply to message #58092] Tue, 15 January 2008 11:05 Go to previous messageGo to next message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
David Fanning wrote:
> Benjamin Hornberger writes:
>
>> I am trying to put a "times" symbol (like the letter x, but not exactly,
>> LaTeX $\times$) into an iTools annotation. I found it in the Helvetica
>> font table at position 327 (octal), but I don't know how to add it to
>> the iTools annotation.
>>
>> David's description on http://www.dfanning.com/ographics_tips/greek.html
>> doesn't seem to help because since I am not creating the text object
>> programmatically I can't use the string() function. Or can I somehow?
>
> Well, I didn't know about that article. Neat. :-)
>
> Here is what I just tried, which seemed to work.
> I started an ISurface plot like this:
>
> IDL> iSurface, Loaddata(2), XTitle='This is a title'
>
> Then, I selected the X axis object and brought up its
> property sheet. I found the Title field in this property
> sheet and changed the title to this:
>
> This is a title !9e!x and this is more title
>
> When I hit the carriage return, the epsilon symbol was
> in the title!
>

Yes, I've used that before. However, in that case the special character
is part of the symbol font and corresponds to the letter "e" in the
normal font (Helvetica). In my case, the special character is in the
Helvetica font already, so I shouldn't even have to change fonts, but I
just don't know how to produce that character (since the keyboard
doesn't have a key for it) ...

What would probably work is to find the identifier of that annotation
and modify it programmatically (from the command line) using the
string() function. But it would be nice if there was an easy thing I
could type into the property sheet.
Re: special characters in iTools annotation [message #58095 is a reply to message #58093] Tue, 15 January 2008 11:00 Go to previous messageGo to next message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
Paul van Delst wrote:
> Benjamin Hornberger wrote:
>> Hi all,
>>
>> I am trying to put a "times" symbol (like the letter x, but not
>> exactly, LaTeX $\times$) into an iTools annotation. I found it in the
>> Helvetica font table at position 327 (octal), but I don't know how to
>> add it to the iTools annotation.
>>
>> David's description on
>> http://www.dfanning.com/ographics_tips/greek.html doesn't seem to help
>> because since I am not creating the text object programmatically I
>> can't use the string() function. Or can I somehow?
>>
>> Thanks for your help,
>> Benjamin
>
> Does this work:
>
> IDL> window
> IDL> x="327B
> IDL> xyouts, 0.5,0.5,string(x),/norm,charsize=6
>
>
> ?

Yes, but this is direct graphics. Also it uses the string() function,
which I know how to use one the command line / programmatically, but I
don't know how to use it in the graphical interface of iTools. If I just
type string(), the string "string()" is added in my annotation ...
Re: special characters in iTools annotation [message #58099 is a reply to message #58095] Tue, 15 January 2008 09:45 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Benjamin Hornberger writes:

> I am trying to put a "times" symbol (like the letter x, but not exactly,
> LaTeX $\times$) into an iTools annotation. I found it in the Helvetica
> font table at position 327 (octal), but I don't know how to add it to
> the iTools annotation.
>
> David's description on http://www.dfanning.com/ographics_tips/greek.html
> doesn't seem to help because since I am not creating the text object
> programmatically I can't use the string() function. Or can I somehow?

Well, I didn't know about that article. Neat. :-)

Here is what I just tried, which seemed to work.
I started an ISurface plot like this:

IDL> iSurface, Loaddata(2), XTitle='This is a title'

Then, I selected the X axis object and brought up its
property sheet. I found the Title field in this property
sheet and changed the title to this:

This is a title !9e!x and this is more title

When I hit the carriage return, the epsilon symbol was
in the title!

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: special characters in iTools annotation [message #58100 is a reply to message #58099] Tue, 15 January 2008 09:39 Go to previous messageGo to next message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Benjamin Hornberger wrote:
> Hi all,
>
> I am trying to put a "times" symbol (like the letter x, but not exactly,
> LaTeX $\times$) into an iTools annotation. I found it in the Helvetica
> font table at position 327 (octal), but I don't know how to add it to
> the iTools annotation.
>
> David's description on http://www.dfanning.com/ographics_tips/greek.html
> doesn't seem to help because since I am not creating the text object
> programmatically I can't use the string() function. Or can I somehow?
>
> Thanks for your help,
> Benjamin

Does this work:

IDL> window
IDL> x="327B
IDL> xyouts, 0.5,0.5,string(x),/norm,charsize=6


?
Re: special characters in iTools annotation [message #58216 is a reply to message #58072] Wed, 16 January 2008 13:06 Go to previous message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
Chris Torrence wrote:
> How about pasting in the micro symbol?
>
> 123�10!u5!n �
>
> Then it seems to work with isolatin1=true. The only problem is that it
> doesn't use the symbol font, so it looks a bit different.
>
> I was able to see the micro character by doing the following:
> print,string(bindgen(128)+128b)
>
> -Chris

Yes, that works. In fact, now that I look at the font table again (Help
index -> TrueType fonts -> samples -- thanks to David for pointing us
there on http://www.dfanning.com/ographics_tips/greek.html) I see the
micro symbol in the Helvetica font at position 265 (octal). I had looked
for that yesterday but somehow missed it.

Since it is part of the Helvetica font, it looks even better than the
character from the symbol font.

Thanks a lot,
Benjamin
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Format of contour labels?
Next Topic: Logic problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:53:07 PDT 2025

Total time taken to generate the page: 0.00477 seconds