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

Home » Public Forums » archive » Re: imcontour no longer plotting in color
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: imcontour no longer plotting in color [message #81028 is a reply to message #81027] Thu, 02 August 2012 03:16 Go to previous message
Balthasar Indermuehle is currently offline  Balthasar Indermuehle
Messages: 22
Registered: August 2012
Junior Member
To add some more information... Here's how the plotting goes, can anyone see a flaw in this? the result is a plot in black and white with contours drawn correctly, and the colorbar in color!

Setting things up:

!p.multi = [0, 1, 1 ] ; plot 1 x 1 plots on one sheet. Set to 0, 2, 2 if you want 2 x 2 plots for example
SET_PLOT, 'PS'
DEVICE, filename=fname, XSIZE=22, YSIZE=22, /COLOR, BITS=8, /ENCAPSULATED, FONT_SIZE=8
TVLCT, INDGEN(256), INDGEN(256), INDGEN(256)

Load the colour table:

cgLoadCT, colourtable, RGB_Table=pal, CLIP=[1, MAX(data_map)/MAX(data_map)*255], /BREWER, /REVERSE


IMCONTOUR, data_map, HDR_MOM, TITLE=title, NLEVELS=num_colours, /FILL, POSITION=pos, PALETTE=pal, TYPE=1, CHARSIZE=1, /OVERLAY

; add contours
CONTOUR, data_map, x, y, levels=FINDGEN(num_cont) * (cp / (num_cont-1.0D)) + (cp / 2), /FOLLOW, /OVERPLOT

plot the colour bar
pos=[0.92, 0.1, 0.94, 0.9]
cgColorbar, Title=title, Divisions=12, NColors=num_colours, $
Range=[MIN(data_map),MAX(data_map)], TickLen=1.0, POSITION=pos, Charsize=1, $
PALETTE=pal, /VERTICAL, /RIGHT, FORMAT='(D0.2)'
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Trig plots auto-shifted (?)
Next Topic: Re: Trig plots auto-shifted (?)

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

Current Time: Wed Oct 08 19:58:39 PDT 2025

Total time taken to generate the page: 0.00453 seconds