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

Home » Public Forums » archive » 2D array as colour dot image
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: 2D array as colour dot image [message #82916 is a reply to message #82704] Thu, 24 January 2013 16:25 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
markjamie@gmail.com writes:

> So I've got an image of my array working quite well, the down side is that often my array is sparsely populated and contains a lot of zeros.
>
> In my code I've been using colour table 39 as it provides fairly good colour variation. The bad thing about using this CT is that the bottom colour is black, which given many of my array elements are zero, means that the majority of my image is black.
>
> I tried replacing all the zeros in my array with. !values.d_nan into the hope that they're not plotted, but they still get drawn as the bottom colour (black).
>
> How can I plot my array using only values above zero, meaning the majority of the image is transparent / the same colour as the background (white), helping the non-zero elements to stand out?

You should have a look at the last example in the new Coyote Graphics
Plot Gallery. In the Density Plot of Two Variables with Contours
Overlaid example, the values that are zero are displayed in a light gray
color. You can make it any color you like.

http://www.idlcoyote.com/gallery/

This is exactly the situation you are facing.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: interpolating flux
Next Topic: how to convert a row of data in a column?

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

Current Time: Fri Oct 10 01:10:10 PDT 2025

Total time taken to generate the page: 0.72158 seconds