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

Home » Public Forums » archive » Re: simplest contour & .png
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: simplest contour & .png [message #80007 is a reply to message #80004] Thu, 26 April 2012 07:45 Go to previous messageGo to previous message
Leslie Moy is currently offline  Leslie Moy
Messages: 4
Registered: August 2011
Junior Member
On Apr 26, 10:17 am, David Fanning <n...@idlcoyote.com> wrote:
> David Fanning writes:
>> The code you want probably looks more like this:
>
>>    cgLoadCT, 33
>>    cgImage, C, /Scale, /Axes, Position=[0.125,0.125,0.95,0.8], /Window
>>    cgColorbar, Range=[min(C),max(C)],Divisions=12, XTicklen=1, $
>>       XMinor=0,  Position=[0.125,0.915,0.955,0.95],$
>>       Charsize=1.00, Format='(F0.4)', /AddCmd
>>    cgControl, Output='tt.png'
>
> Now that I think about it, if you really just want 12
> colors, the code probably looks more like this:
>
>    cgLoadCT, 33, NColors=12
>    cgImage, BytScl(C, TOP=11), /Axes, Position=[0.125,0.125,0.95,0.8], $
>       /Window
>    cgColorbar, Range=[min(C),max(C)], /Discrete, $
>       Postion=[0.125,0.915,0.955,0.95],$
>       Charsize=1.00, Format='(F0.4)', NColors=12, /AddCmd
>    cgControl, Output='tt.png'
>
> 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.")

It works if I get rid of '/discrete' to the cgcolorbar command.
Also, i use 'create_png' not 'output'. My version didn't recognize
'output'. Is this a new command? (I haven't updated in a while).

Btw, why is choosing 12 colors significant? (I chose it because that
was the value you have in your book's example). When would i have to
use your first suggestion?

My first post! Thank you very very much.

Leslie
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to make an input parameters file??
Next Topic: IDL v7.0 "native" colourbar procedure?

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

Current Time: Wed Oct 08 17:28:51 PDT 2025

Total time taken to generate the page: 0.00419 seconds