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

Home » Public Forums » archive » simplest contour & .png
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
simplest contour & .png [message #80011] Thu, 26 April 2012 06:39 Go to next message
Leslie Moy is currently offline  Leslie Moy
Messages: 4
Registered: August 2011
Junior Member
It seems like it should be easy...

I have a 2D array C(20,20) and i want to make a simple figure with
20x20 colored boxes. I started with a CG contour template but have two
questions.

1. i assumed there must be a command to Not make it contour and just
put in a colored box. is there such a thing? or am i starting out
wrong with 'contour'?

2. i want to output to a .png file. but i get two figures with my code
below - one of the contour plot, the other of the colorbar. normally i
would think to add in /overplot to cgcolorbar but that gives me an
error.

cgwindow
nlevels=12
loadct,33,ncolors=nlevels,bottom=1
step=(max(C)-min(C))/nlevels
levels=indgen(nlevels)*step+min(C)
setdecomposedstate,0,currentstate=currentstate

cgcontour,C,/fill,Levels=levels,position=[0.125,0.125,0.95,0 .8],$
background=cgcolor('white'),color=cgcolor('black'),$
xstyle=1,ystyle=1,c_colors=indgen(nlevels)+1,/window

setdecomposedstate,currentstate
cgcolorbar,range=[min(C),max(C)],divisions=12,xticklen=1,xmi nor=0,$
annotatecolor='black',ncolors=12,bottom=1, $

position=[0.125,0.915,0.955,0.95],charsize=1.00,format='(F0. 4)'

cgcontrol,create_png='tt.png'
Re: simplest contour & .png [message #80127 is a reply to message #80011] Mon, 30 April 2012 10:28 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> No, coyote_library_1.12.6 will.

I should say "does", because I just did it.

A little crazy around here this morning. I'm on the verge
of publishing some of my *real* writing (nothing whatsoever
to do with IDL) as an e-book and then there was a death
in the family, so we have a lot of balls in the air today.

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: simplest contour & .png [message #80128 is a reply to message #80011] Mon, 30 April 2012 10:23 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul van Delst writes:

> Does the "coyote_library_1.12.5" tag include these latest updates?

No, coyote_library_1.12.6 will.

> The google-code repo browser is pretty brain dead regarding timeline
browsing and the "committed changes" list doesn't
> have any entries for tag creation.
>
> Your library is part of our repository as well and, as such, I'd rather provide a tagged version than one from trunk.
> The last tagged version mentioned on your project page is v1.11.0 (from 03 March)

Yes, you are having me tag these so often, I would have to
get paid double my current salary to spend my time updating
the project page. I now have Twitter, Facebook, and Google +
to keep up with, too!

> p.s. I really like the "Issues" page on your google code site. Of the
idl-coyote project it states: "This project
> currently has no issues." Man... I lay awake at night dreaming about reaching that stage with my software projects.

Well, I think it should say "no issues I feel like dealing with at
the moment." I tend to fix any issue in find in less time than it takes
me to write about it, which probably explains the overly aggressive
tag releases. :-)

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: Re: IDL v7.0 "native" colourbar procedure?
Next Topic: Relationship between IDLgrXXXX and associated NG functions. Was: IDL documentation gripe - How to erase a new graphics window?

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

Current Time: Sat Oct 11 05:24:13 PDT 2025

Total time taken to generate the page: 1.20039 seconds