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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: idl8 window size and arrow [message #84480] Fri, 24 May 2013 05:01
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le jeudi 23 mai 2013 19:14:27 UTC+2, Mike Galloy a écrit :
> 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.
>

On my machine, I can.
{ x86_64 Win32 Windows Microsoft Windows 8.2.2 Jan 23 2013 64 64}

>
>> 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).
>
I agree.
>
>> 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.
>
I have *no* problem in adding arrow with Annotate button.
>
>> 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.
>

It seems to be some limit on minimal window size one can create from the Workbench: 484 x 335 on my machine, whatever smaller dimensions are asked.

From IDL Command line I can get a smaller (100 x 100) window but the window frame around the 100 x 100 drawing surface is enlarged in order that all icons at bottom can be displayed.

In addition, the couple of statements:
w = window(window_title="My window", dimensions=[500, 100])
ar = arrow([50, 200], fltarr(2) + 200., /device, head_size=3.)
creates, in case of the IDL Command line, a window of correct size but, of course, the arrow at Y-position 200, while window height is only 100 pixels, is likely clipped.

>
> 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
Re: idl8 window size and arrow [message #84481 is a reply to message #84480] Fri, 24 May 2013 04:20 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Hilarious!

On Thursday, May 23, 2013 10:23:08 PM UTC-4, David Fanning wrote:
> laoli writes:
>
>
>
>> I tried a few Windows machines with the same version of IDL, and they all have the same problems. Not sure if my installation was wrong, or there is a bug, or something else caused it.
>
>
>
> I would say almost certainly a bug in that version of IDL. That's the
>
> version that the Onion reporter interviewed me about:
>
>
>
> http://www.idlcoyote.com/ng_tips/onion.php
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: idl8 window size and arrow [message #84483 is a reply to message #84481] Thu, 23 May 2013 19:23 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
laoli writes:

> I tried a few Windows machines with the same version of IDL, and they all have the same problems. Not sure if my installation was wrong, or there is a bug, or something else caused it.

I would say almost certainly a bug in that version of IDL. That's the
version that the Onion reporter interviewed me about:

http://www.idlcoyote.com/ng_tips/onion.php

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: idl8 window size and arrow [message #84484 is a reply to message #84483] Thu, 23 May 2013 18:35 Go to previous message
laoli is currently offline  laoli
Messages: 5
Registered: May 2013
Junior Member
Hi Mike,

I tried a few Windows machines with the same version of IDL, and they all have the same problems. Not sure if my installation was wrong, or there is a bug, or something else caused it.

Thank you very much for your patient help. Gratefully appreciated.

Lao li
Re: idl8 window size and arrow [message #84486 is a reply to message #84484] Thu, 23 May 2013 10:14 Go 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
Re: idl8 window size and arrow [message #84495 is a reply to message #84486] Wed, 22 May 2013 20:32 Go to previous message
laoli is currently offline  laoli
Messages: 5
Registered: May 2013
Junior Member
On Tuesday, May 21, 2013 2:29:27 AM UTC+10, Mike Galloy wrote:
> On 5/20/13 10:28 AM, Michael Galloy wrote:
>
>> On 5/20/13 1:06 AM, laoli wrote:
>
>>> w = WINDOW(WINDOW_TITLE="My Window", DIMENSIONS=[500,100])
>
>>> t = TEXT(50, 220, "$\it Draw arrow here$", /DEVICE)
>
>>> arrow, 50, 100,200, 100
>
>>
>
>> The ARROW procedure is a direct graphics routine. The way to draw an
>
>> arrow in the Function Graphics system is to use the ARROW function:
>
>>
>
>> ar = arrow([50, 200], [50, 50], /device, head_size=3.)
>
>>
>
>> Mike
>
>
>
> Also, the window is 500 by 100 on my system:
>
>
>
> IDL> print, !version
>
> { x86_64 darwin unix Mac OS X 8.2.2 Jan 23 2013 64 64}
>
>
>
> Mike
>
> --
>
> Michael Galloy
>
> www.michaelgalloy.com
>
> Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
>
> Research Mathematician
>
> Tech-X Corporation

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

2), the window dimension still does not work on my machine:
{ x86_64 Win32 Windows Microsoft Windows 8.0.1 Oct 5 2010 64 64}

Regards
Lao li
Re: idl8 window size and arrow [message #84530 is a reply to message #84495] Mon, 20 May 2013 09:29 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 5/20/13 10:28 AM, Michael Galloy wrote:
> On 5/20/13 1:06 AM, laoli wrote:
>> w = WINDOW(WINDOW_TITLE="My Window", DIMENSIONS=[500,100])
>> t = TEXT(50, 220, "$\it Draw arrow here$", /DEVICE)
>> arrow, 50, 100,200, 100
>
> The ARROW procedure is a direct graphics routine. The way to draw an
> arrow in the Function Graphics system is to use the ARROW function:
>
> ar = arrow([50, 200], [50, 50], /device, head_size=3.)
>
> Mike

Also, the window is 500 by 100 on my system:

IDL> print, !version
{ x86_64 darwin unix Mac OS X 8.2.2 Jan 23 2013 64 64}

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
Re: idl8 window size and arrow [message #84531 is a reply to message #84530] Mon, 20 May 2013 09:28 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 5/20/13 1:06 AM, laoli wrote:
> w = WINDOW(WINDOW_TITLE="My Window", DIMENSIONS=[500,100])
> t = TEXT(50, 220, "$\it Draw arrow here$", /DEVICE)
> arrow, 50, 100,200, 100

The ARROW procedure is a direct graphics routine. The way to draw an
arrow in the Function Graphics system is to use the ARROW function:

ar = arrow([50, 200], [50, 50], /device, head_size=3.)

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
Re: idl8 window size and arrow [message #84733 is a reply to message #84530] Wed, 22 May 2013 20:28 Go to previous message
laoli is currently offline  laoli
Messages: 5
Registered: May 2013
Junior Member
On Tuesday, May 21, 2013 2:29:27 AM UTC+10, Mike Galloy wrote:
> On 5/20/13 10:28 AM, Michael Galloy wrote:
>
>> On 5/20/13 1:06 AM, laoli wrote:
>
>>> w = WINDOW(WINDOW_TITLE="My Window", DIMENSIONS=[500,100])
>
>>> t = TEXT(50, 220, "$\it Draw arrow here$", /DEVICE)
>
>>> arrow, 50, 100,200, 100
>
>>
>
>> The ARROW procedure is a direct graphics routine. The way to draw an
>
>> arrow in the Function Graphics system is to use the ARROW function:
>
>>
>
>> ar = arrow([50, 200], [50, 50], /device, head_size=3.)
>
>>
>
>> Mike
>
>
>
> Also, the window is 500 by 100 on my system:
>
>
>
> IDL> print, !version
>
> { x86_64 darwin unix Mac OS X 8.2.2 Jan 23 2013 64 64}
>
>
>
> Mike
>
> --
>
> Michael Galloy
>
> www.michaelgalloy.com
>
> Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
>
> Research Mathematician
>
> Tech-X Corporation

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.

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

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

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

Is there
Regards
  Switch to threaded view of this topic Create a new topic Submit Reply
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 11:35:21 PDT 2025

Total time taken to generate the page: 0.00479 seconds