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

Home » Public Forums » archive » Write PNG from plots with different color tables??
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Write PNG from plots with different color tables?? [message #69873] Tue, 02 March 2010 10:51 Go to previous message
Mark Shephard is currently offline  Mark Shephard
Messages: 13
Registered: July 1999
Junior Member
Hi all,

I need help! This should be very simple, but I cannot seem to find a
solution. I have having problems with the fact that I have two plots
using two different color tables that I would like to write into one
png file, but, write_png that only accepts one color table. Here is
an example outline:

set_plot, 'z'
;; load color table
loadct, 0
tvlct, r, g, b, /get

!P.BACKGROUND = 255 ;white

;;plot simple x,y plot
plot, x, y, color=1

;;read in gif image and colors
read_gif, image_gif, r_gif, g_gif, b_gif
TVLCT, r_gif, g_gif, b_gif

;;plot gif image
TVSCL, image_gif, 0.85,0.035, /normal

image = tvrd()
write_png, file_out, image, r, g, b

As you can see I have used two r,g,b, color palletes generating the
plots : r,g,b (black and white plot) and r_gif, g_gif, b_gif (from
gif image). This is fine until I need to generate a png file that
only takes one color table.

Any helpful tips?...Merge color tables? Somehow force both plots to
just the same color table (..no keyword option for read_gif)?

Thanks,
Mark
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Generalized Extreme Value Distribution?
Next Topic: Re: IDLgrPolygon Leak?

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

Current Time: Sun Oct 12 09:01:08 PDT 2025

Total time taken to generate the page: 1.76086 seconds