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

Home » Public Forums » archive » strange behaviour of color property in function graphics
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
strange behaviour of color property in function graphics [message #89586] Thu, 30 October 2014 04:35 Go to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
Hi,
I've just came across this:

This is ok:

IDL> i = image(/test)
IDL> t = text(0.5,0.5,'test', 'r', /norm)

This gives an error:
IDL> i = image(/test)
IDL> t = text(0.5,0.5,'test', /norm, color='r')
% TEXT: <LONG Array[1]>.
% Execution halted at: $MAIN$

I think that this is a bug, because:
1) it works for the plot function:
p = plot(/test, color='r')
2) the description of the color property in plot() and text() is the same (set the property to a string or RGB vector: http://www.exelisvis.com/docs/FormattingSymsAndLines.html)

Running the debug option in text, I get the following error:

% ITEXT: <LONG Array[1]>.
% Execution halted at: TEXT 119 C:\Program Files\Exelis\IDL84\lib\graphics\text.pro

Something strange is going on with the color variable being, as the error says, a an array and not a scalar.

cheers,
Helder
Re: strange behaviour of color property in function graphics [message #89587 is a reply to message #89586] Thu, 30 October 2014 05:08 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
Hi again Helder,

On 30.10.2014 12:35, Helder wrote:
> This gives an error:
> IDL> i = image(/test)
> IDL> t = text(0.5,0.5,'test', /norm, color='r')
> % TEXT: <LONG Array[1]>.
> % Execution halted at: $MAIN$

No error in IDL 8.3!

There seems to be a bunch of changes in IDL8.4 ...

Fabien
Re: strange behaviour of color property in function graphics [message #89588 is a reply to message #89587] Thu, 30 October 2014 05:20 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Thursday, October 30, 2014 1:08:26 PM UTC+1, Fabien wrote:
> Hi again Helder,
>
> On 30.10.2014 12:35, Helder wrote:
>> This gives an error:
>> IDL> i = image(/test)
>> IDL> t = text(0.5,0.5,'test', /norm, color='r')
>> % TEXT: <LONG Array[1]>.
>> % Execution halted at: $MAIN$
>
> No error in IDL 8.3!
>
> There seems to be a bunch of changes in IDL8.4 ...
>
> Fabien

Yeah,
and we're chasing them down...
h
Re: strange behaviour of color property in function graphics [message #89589 is a reply to message #89588] Thu, 30 October 2014 05:27 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Helder writes:

> and we're chasing them down...

At least today is starting off with a smile. :-)

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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: dictionary bug
Next Topic: Bad Advice?

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

Current Time: Wed Oct 08 09:20:28 PDT 2025

Total time taken to generate the page: 0.00427 seconds