Groups | Search | Server Info | Login | Register
| Newsgroups | comp.lang.idl |
|---|---|
| Date | 2017-10-26 07:25 -0700 |
| References | <02e718c9-305a-496a-a273-3e3509d5c325@googlegroups.com> |
| Message-ID | <49189eb2-eccf-46c1-96e8-713fc5cbfdd1@googlegroups.com> (permalink) |
| Subject | Re: Array of String \pm |
| From | benjamin.castellani@gmail.com |
On Sunday, August 6, 2017 at 1:02:59 PM UTC-6, Richa Mathur wrote: > Hi > I want to declare an array of strings whose elements I wish to use in title of plot function. > > I declare it as... > > freq=['23.8 GHz','31.399 GHz', '50.299 GHz', '52.8 GHz', '53.595+'$\pm$'+ 0.115 GHz'] > > the \pm is the symbol for +- . > > when I say print, freq, I see nothing printed. However when I don't use \pm I see printout the right values. > Any help > GlanPlon Hi there! IDL only supports the LaTex syntax for graphics. It does not work for data storage or display in the IDL console or IDL Command Line. You will want to use the BYTE/STRING functions together to create the special character....like... PM_SYMBOL = string(byte(177)) 177 is the byte value for the plus/minus symbol. Other symbol values can be found here: http://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec&unicodeinhtml=dec Now that +/- is stored as a string, you can use it like: freq=['23.8 GHz','31.399 GHz', '50.299 GHz', '52.8 GHz', '53.595 '+PM_SYMBOL+' 0.115 GHz'] Hope this helps. Ben C IDL Team Harris Geospatial Solutions
Back to comp.lang.idl | Previous | Next — Previous in thread | Find similar
Array of String \pm gompiemathur@gmail.com - 2017-08-06 12:02 -0700 Re: Array of String \pm benjamin.castellani@gmail.com - 2017-10-26 07:25 -0700
csiph-web