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

Home » Public Forums » archive » Re: xyouts for iPlot?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: xyouts for iPlot? [message #55635 is a reply to message #55634] Wed, 29 August 2007 09:23 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Kenneth Bowman wrote:
> In article <1188352232.492045.316340@l22g2000prc.googlegroups.com>,
> pdoherty <pedoherty@earthlink.net> wrote:
>
[snip]
>> So, in as few words as possible, can someone tell me how to annotate a
>> plot I've made by calling iPlot from within my program?
>>
>> Sorry if this is a trivial problem, but I haven't figured it out.
>>
>
> You need to do something like this
>
> idAnnotate = itool_obj -> FindIdentifiers('*/ANNOTATION LAYER') ;Get annotation layer ID
> oAnnotate = itool_obj -> getByIdentifier(idAnnotate) ;Get annotation object
> oAnnotate -> add, OBJ_NEW('IDLitVisText', _STRING = 'This is a string', $ ;Add title in annotation plane
> ALIGNMENT = 0.5, $
> VERTICAL_ALIGNMENT = 1.0, $
> FONT_SIZE = 24, $
> LOCATION = [0.5, 0.5, 0.5])
>

Holy cow.

Would syntactic sugar be sufficient to avoid the first two calls? Why can't the interface
to add a text string do all the heavy lifting so the user doesn't have to necessarily know
about retrieving identifiers and objects and knowing the precise object name(s)?
('IDLitVisText'? Who came up with that oh so intuitive name?)

e.g.

PRO itool_xyouts, itool_obj, string, _extra=extra
idAnnotate = itool_obj -> FindIdentifiers('*/ANNOTATION LAYER')
oAnnotate = itool_obj -> getByIdentifier(idAnnotate)
oAnnotate -> add, OBJ_NEW('IDLitVisText', _STRING = string, _extra=extra)
END

At the very, IDL should provide the same basic functionality and *ease of use* for OG as
we have in DG.

cheers,

paulv
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Ternary diagram
Next Topic: Re: Programmatic size adjustment of widgets under Windows vs. UNIX (was "Natural size of explicitly-sized widget")

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

Current Time: Tue Dec 02 10:16:56 PST 2025

Total time taken to generate the page: 1.36585 seconds