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

Home » Public Forums » archive » Re: cgColorBar with /device
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: cgColorBar with /device [message #80488] Wed, 13 June 2012 08:14
bio_amateur is currently offline  bio_amateur
Messages: 7
Registered: August 2010
Junior Member
On Jun 13, 10:43 am, David Fanning <n...@idlcoyote.com> wrote:
> David Fanning writes:
>
>> bio_amateur writes:
>
>>> It seems that cgColorBar doesn't work when I use device coordinate,
>>> rather than normalized coordinate. Any idea?
>>> When I use
>>>   cgColorbar, Range=[Min(data2D),Max(data2D)], $
>>>               Divisions=12, XTicklen=1, XMinor=0, $
>>>               AnnotateColor='black', NColors=nlevels, Bottom=1, $
>>>               Format='(F0.2)', $
>>>               Position=1000*[0.125, 0.915, 2.955, 2.95], /device, $
>>>               Charsize=0.7 , /vertical
>
>>> It only gives me a white box with labels, no colors are filled in the
>>> box.
>
>> Yes, POSITION is always given in Normalized coordinates.
>> Across *all* IDL direct graphics routines. :-)
>
> By the way, positioning with DEVICE coordinates is
> a perfect way to totally screw up everything you hope
> to do with graphics. My advice would be to forget you
> ever heard about DEVICE coordinates. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Thanks a lot David.

Bests,
Tuan
Re: cgColorBar with /device [message #80489 is a reply to message #80488] Wed, 13 June 2012 07:43 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

>
> bio_amateur writes:
>
>>
>> It seems that cgColorBar doesn't work when I use device coordinate,
>> rather than normalized coordinate. Any idea?
>> When I use
>> cgColorbar, Range=[Min(data2D),Max(data2D)], $
>> Divisions=12, XTicklen=1, XMinor=0, $
>> AnnotateColor='black', NColors=nlevels, Bottom=1, $
>> Format='(F0.2)', $
>> Position=1000*[0.125, 0.915, 2.955, 2.95], /device, $
>> Charsize=0.7 , /vertical
>>
>> It only gives me a white box with labels, no colors are filled in the
>> box.
>
> Yes, POSITION is always given in Normalized coordinates.
> Across *all* IDL direct graphics routines. :-)

By the way, positioning with DEVICE coordinates is
a perfect way to totally screw up everything you hope
to do with graphics. My advice would be to forget you
ever heard about DEVICE coordinates. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: cgColorBar with /device [message #80490 is a reply to message #80489] Wed, 13 June 2012 07:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
bio_amateur writes:

>
> It seems that cgColorBar doesn't work when I use device coordinate,
> rather than normalized coordinate. Any idea?
> When I use
> cgColorbar, Range=[Min(data2D),Max(data2D)], $
> Divisions=12, XTicklen=1, XMinor=0, $
> AnnotateColor='black', NColors=nlevels, Bottom=1, $
> Format='(F0.2)', $
> Position=1000*[0.125, 0.915, 2.955, 2.95], /device, $
> Charsize=0.7 , /vertical
>
> It only gives me a white box with labels, no colors are filled in the
> box.

Yes, POSITION is always given in Normalized coordinates.
Across *all* IDL direct graphics routines. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: cgColorBar with /device
Next Topic: Newbie trying out IDL scripts

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

Current Time: Thu Oct 09 20:41:57 PDT 2025

Total time taken to generate the page: 1.91582 seconds