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

Home » Public Forums » archive » Re: help with transparent plot in version 8.2.2
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: help with transparent plot in version 8.2.2 [message #83624 is a reply to message #83623] Fri, 15 March 2013 14:03 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
Hi Teddy,

I can explain this. In the docs for the TRANSPARENT keyword, there is a little-known sentence: "Set this keyword to an RGB value (a three-element vector of the form [R, G, B]) indicating which pixels in the output image should be made transparent. If this keyword is set to 1, the color of the lower left pixel in the image is used as the transparent color."

So, in your example with POSITION, you are putting the plot into the lower-left corner. So the pixel at [0,0] is actually black, which is unfortunately getting assigned as the transparent color!

The solution is to do p.Save, 'plot.png', TRANSPARENT=[255,255,255], which forces the transparent color to be white.

Hope this helps.

-Chris
ExelisVIS
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: cgPlotS and cgColorBar issues
Next Topic: setcurrent and buffer don't work together?

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

Current Time: Wed Oct 08 15:28:48 PDT 2025

Total time taken to generate the page: 0.00421 seconds