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

Home » Public Forums » archive » cgcontour and cgcolorbar irregular levels
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
cgcontour and cgcolorbar irregular levels [message #93514] Tue, 09 August 2016 10:22 Go to previous message
tho.siegert is currently offline  tho.siegert
Messages: 6
Registered: April 2014
Junior Member
Hi all,

my problem is that when I use irregular spacings for contours in e.g. cgcontour, and then want to use a colorbar for it, e.g. with cgcolobar, I cannot match the colorbar and the data.

Example:
cgdisplay,1024*1.25,1024
cgloadct,39
aa = 10^(dindgen(100)/99*4-2)
cgcontour,dist(100)^2,aa,aa,levels=[2^(dindgen(10)),(dindgen (10)+1)*550],/fill,position=[0.1,0.1,0.74,0.9],/xlog,/ylog
cgcontour,dist(100)^2,aa,aa,levels=[2^dindgen(10),(dindgen(1 0)+1)*550],/noerase,position=[0.1,0.1,0.74,0.9],/xlog,/ylog
cgcolorbar,pos=[0.8,0.1,0.9,0.9],/vert,range=minmax([2^dindg en(10),(dindgen(10)+1)*550]),/ylog

You can immediately see that neither the colorbar range does not conform to the data. Also if the /ylog is removed, of course, it does not fit.

What do I have to do if I need irregular (here powerlaw for low values and linear for high values) contours and colours?

Thanks,
Thomas
[Message index]
 
Read Message
Read Message
Previous Topic: "Automatically indent lines" breaks copying and pasting code
Next Topic: Pros & cons of methods 1) DLM and 2) Call_External of calling C from IDL

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

Current Time: Wed Oct 08 15:06:50 PDT 2025

Total time taken to generate the page: 0.00457 seconds