cgcontour and cgcolorbar irregular levels [message #93514] |
Tue, 09 August 2016 10:22  |
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
|
|
|
|