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

Home » Public Forums » archive » adding legend to overlapping cghistoplot histograms
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: adding legend to overlapping cghistoplot histograms [message #88059 is a reply to message #88058] Mon, 17 March 2014 08:10 Go to previous messageGo to previous message
Jahvasc is currently offline  Jahvasc
Messages: 9
Registered: March 2014
Junior Member
Em segunda-feira, 17 de março de 2014 14h21min18s UTC+1, Matthew Argall escreveu:
> Can you give us an idea of what you are doing and what is going wrong? Perhaps include the program you wrote...

Ok, here is the program:

items=['Disk stars','Diskless stars']

if(kd ne !NULL) then $
cgHistoplot,P[kd],binsize=0.5,xrange=[0.,16.],$
max_value=maxvalue,$
/fill,polycolor=['light coral']

cgHistoplot,P[kdl],binsize=0.5,/oplot,$
xrange=[0.,16.],/fill,polycolor=['royal blue']

firstPlot=cgsnapshot()

cgHistoplot,P[kdl],binsize=0.5,xrange=[0.,16.],/fill,$
max_value=maxvalue,polycolor=['royal blue']

if(kd ne !NULL) then $
cgHistoplot,P[kd],binsize=0.5,/fill,$
/oplot,xrange=[0.,16.],polycolor=['light coral']

secondPlot=cgsnapshot()

cgBlendimage, firstPlot, secondPlot, ALPHA=0.75

AL_legend,items, PSym=16,charsize=1.,/window,$
SymSize=1, Color=['light coral','royal blue'],pos=[7.,15000]

Then I got the message "A cgwindow does not exist to add a command to". But I cannot figure out which options I should use in order to have the blending and the legend.

Thank you for your attention,
Jaqueline
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Pi is Rotten?
Next Topic: IDL's function SFIT coefficients

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

Current Time: Wed Oct 08 17:34:18 PDT 2025

Total time taken to generate the page: 0.00437 seconds