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

Home » Public Forums » archive » Using TV command instead of contour
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: Using TV command instead of contour [message #76945 is a reply to message #76865] Wed, 13 July 2011 08:55 Go to previous messageGo to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Jul 13, 8:21 am, Amit <amisra.a...@gmail.com> wrote:
> Hi Paolo,
>
> Many many thanks for your help. pg_plotimage does work fine and solves
> the problem.
>
> However, I see differences in the colours here as compared to those
> from CONTOUR, though I used the same colour table. Is there any way I
> can change the colours?
>
> BACKGROUND option is working fine, however I am not able to change the
> font color either. (I need to produce the plot on a white background,
> with axis labels etc in black).
>
> Finally is there any way to display the colour bar? Since the MARGIN
> keyword is not allowed, I do not think the conventional COLOR_BAR
> program would work.
>
> Thanks
> Amit

Well, you should compare the colors from what you get by tv/tvscl.
If those are the same (more or less) then pg_plotimage is working
as intended. If you see a difference, it may be due to the
interpolation
scheme used to convert a big image in memory to a small image on the
screen
- try plotting just a small part of the image and see if it helps.

I cannot comment on the colors used by contour, but the consensus
seems to be
they are somewhat weird, see http://www.idlcoyote.com/tips/contour_hole.php

To have the labels/axes of a different color you can modify !p.color
before
calling pg_plotimage.

pg_plotimage honors the position keyword, so you can plot your image
first
and then use pg_plotimage to plot the color bar (at a different
position)
by using the /noerase keyword as you would for a regular plot.

example:

loadct,5
!p.color=255
pg_plotimage,dist(512,512),charcolor=128,/xst,/
yst,position=[0,0,0.5,0.5]
!p.color=140
pg_plotimage,dist(512,512),charcolor=128,/xst,/
yst,position=[0.6,0.6,0.9,0.9],/noerase


Ciao,
Paolo
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: GONG SOLAR DATA ANALYSIS IN IDL
Next Topic: Multiple-plot multiple-page landscape postscript problem

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

Current Time: Wed Oct 08 17:09:47 PDT 2025

Total time taken to generate the page: 0.00412 seconds