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 #78973 is a reply to message #78971] Tue, 17 January 2012 10:22 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Russell writes:

> UPDATE: I tried a variant of a trick by David F., but for the y-axis
> http://www.idlcoyote.com/tips/another_yaxis.html . For some kooky
> reason, as soon as I use the axis.pro (function not procedure), the
> colors and transparency immediately go away. GRRR!!!

Here is some code that worked surprisingly well!

pos = [0.125, 0.15, 0.9, 0.875]
x = findgen(101)
y1 = cgDemoData(17)
y2 = cgDemoData(17)
cgPlot, x, y1, /NoData, Position=pos, xtickformat='(A1)', $
ytickformat='(A1)'
cgColorfill, [x[0],x,x[-1]], [!Y.Crange[0], y1,!Y.Crange[0]], $
/data, color='yellow'
p1 = cgsnapshot()
cgerase
cgPlot, x, y2, /NoData, Position=pos, xtickformat='(A1)', $
ytickformat='(A1)'
cgColorfill, [x[0],x,x[-1]], [!Y.Crange[0], y2,!Y.Crange[0]], $
/data, color='olive'
p2 = cgsnapshot()
cgblendimage, p1, p2
cgPlot, x, y1, thick=2, /Noerase, Position=pos
cgplot, x, y2, /Overplot, thick=2
END

Your mileage may vary. For for 5 minutes work, it's not too
bad. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[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: Fri Oct 10 04:10:46 PDT 2025

Total time taken to generate the page: 0.15893 seconds