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 
Return to the default flat view Create a new topic Submit Reply
strange behaviour of color property in function graphics [message #89586] Thu, 30 October 2014 04:35 Go to previous 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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: dictionary bug
Next Topic: Bad Advice?

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

Current Time: Wed Oct 08 13:32:01 PDT 2025

Total time taken to generate the page: 0.00960 seconds