Re: overlapping plots [message #1626] |
Mon, 10 January 1994 15:39  |
sterne
Messages: 15 Registered: March 1992
|
Junior Member |
|
|
>>>> > "Andy" == ftacn <ftacn@aurora.alaska.edu> writes:
Andy> I've got a question: I'm making some IDL plots that have shaded
Andy> regions that overlap. Right now, the region that's printed first
Andy> covers up the other region. Do you know of a way to make it so
Andy> the both shaded regions can be seen and the one in the foreground
Andy> doesn't totally block out the one behind? I guess what I want is
Andy> a shading that acts transparent so that you can still see the
Andy> shaded region under it. Did that make sense? Got any ideas?
Andy> -Andy
One way would be to get the two plots (images or whatever) into two
separate images; use tvrd to read the screen, for example, or use any of
the routines which generate an image for subsequent display by tv
(polyshade, for example).
Lets assume you end up with two equally sized byte-scaled image arrays,
front_im and back_im. Determine the value which corresponds to your
background (generally 0b on the screen, often 255b for the printer).
I'll suppose here its 0b. Then
im_final = im_front ; start to construct final image
;
ind_bg = where(im_final eq 0b) ; find indices of "background"
;
im_final(ind_bg) = im_back(ind_bg) ; overwrite background with
; back image, otherwise leaving
; front image unaffected.
tv,im_final ; display it
This can look kinda grainy unless you choose a large enough window to do
the tvrd in, but it does work.
Hope this helps,
Phil
--
------------------------------------------------------------ ---------
Philip Sterne | sterne@dublin.llnl.gov
Lawrence Livermore National Laboratory | Phone (510) 422-2510
Livermore, CA 94550 | Fax (510) 422-7300
|
|
|