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

Home » Public Forums » archive » Re: 8.* graphics
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: 8.* graphics [message #78967 is a reply to message #78966] Tue, 17 January 2012 10:54 Go to previous messageGo to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On 17 jan, 18:22, Russell <rryan....@gmail.com> wrote:
> Okay, so I'm trying my hand at the new graphics features in IDL 8,
> mostly because doing this in the classic direct graphics way is
> incredible painful and (according to the help pages) the new stuff
> should be able to knock this one out of the park.  Famous last words,
> I know.  So here's the problem:
>
> I'm trying to make a figure for an upcoming proposal where I want to
> show a series of transmission curves (as a function of wavelength)
> with the area under each curve shaded a different color.  Many of
> these curves have small overlaps with adjacent bands, and I'd like to
> have the shading be the transparency (a la red+blue = purple).  It
> seems that plot.pro (the function not the procedure) is ready and
> willing to do this, but I desperately need the x-axis to be displayed
> as a log (so xlog=1b).  However! the shading and transparency is
> completely gone when I set xlog=1b!   AAGGHH!  Am I crazy, does anyone
> know anything about this?
>
> -Russell
>
> PS, Yes, I'm aware that I can simply take the logarithm of the axis
> and plot log(wavelength), but (1) I prefer the log-spaced tick marks
> and (2) it *SHOULD* work!  switching this bit shouldn't affect the
> colors!

What about this ?

x = 10^(findgen(100)*0.03)
b1 = exp(-(alog10(x)-1)^2/0.3)
b2 = 0.5*exp(-(alog10(x)-2)^2/0.2)

p1 = plot(x, b1, COLOR='red', /XTICKDIR, /YTICKDIR, /XLOG, THICK=3)
p2 = plot(x, /OVERPLOT, b2, COLOR='blue', THICK=3)
poly1 = polygon([x,x[0]], [b1,0], -0.01+fltarr(101), /DATA,
LINESTYLE=6, $
/FILL_BACKGROUND, FILL_COLOR=!COLOR.DEEP_PINK, FILL_TRANSPARENCY=50)
poly2 = polygon([x,x[0]], [b2,0], -0.01+fltarr(101), /DATA,
LINESTYLE=6, $
/FILL_BACKGROUND, FILL_COLOR=!COLOR.DEEP_SKY_BLUE,
FILL_TRANSPARENCY=50)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Where is where?
Next Topic: Re: confidence level

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

Current Time: Wed Oct 08 17:54:13 PDT 2025

Total time taken to generate the page: 0.00389 seconds