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

Home » Public Forums » archive » Re: idl8 window size and arrow
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: idl8 window size and arrow [message #84486 is a reply to message #84484] Thu, 23 May 2013 10:14 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 5/22/13 9:28 PM, laoli wrote:
> Many thanks Mike. Your explanation about different graphics is greatly helpful.
>
> 1) I added your line of code
> ar = arrow([50, 200], [50, 50], /device, head_size=3.)
> to my test script.
>
> 1a), the word "arrow" does not change color as other function names do.

I does not in the IDL 8.2.2 Workbench either. This looks like a bug in
the Workbench.

> 1b), when running it, an error message appeared:
> Unable to invoke method on NULL object reference: <OBJREF (<NullObject>)>.

I can't reproduce that error in the Workbench or from the command line
(the widget system used for function graphics is different in these cases).

> 1c), when commented out your line of code, and used the Annotate tools provided at the bottom of the graphic window, all other tools (such as Text, Oval) worked fine, but the Arrow tool caused an error message:
> Unable to locate target descriptor: MANIPULATORS/ANNOTATION/ARROW

I also couldn't get that to happen.

> 2) The window size is a problem on my machine:
> { x86_64 Win32 Windows Microsoft Windows 8.0.1 Oct 5 2010 64 64}

But I did have problems (depending on Workbench/command line):

a) From the Workbench, I could not get the window to be only 100
pixels tall. But at least coordinates seemed correct.

b) From the command line, the coordinate system is screwed up. The
window shows up as 100 pixels tall, but to get the arrow and text to
appear in the window, I had to position them at over 100 pixels (200
pixels appeared to be the center of the window, making the device
coordinates of the window start at 150 and go up to 250).

Here is the code I was using:

pro mg_arrow_test
w = window(window_title="My window", dimensions=[500, 100])
t = text(50, 220, "$\it draw arrow here$", /device)
ar = arrow([50, 200], fltarr(2) + 200., /device, head_size=3.)
end


Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: minimization method(amoeba subroutine)
Next Topic: True-Type Font Confusion

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

Current Time: Wed Oct 08 13:36:16 PDT 2025

Total time taken to generate the page: 0.00499 seconds