|
|
Re: adding legend to overlapping cghistoplot histograms [message #88059 is a reply to message #88058] |
Mon, 17 March 2014 08:10   |
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
|
|
|
|
Re: adding legend to overlapping cghistoplot histograms [message #88061 is a reply to message #88060] |
Mon, 17 March 2014 08:38  |
Jahvasc
Messages: 9 Registered: March 2014
|
Junior Member |
|
|
I did that, but then I got only the last item...
But the problem was that I was ill-defining the "items" parameter..
Sorry to take your time with such a silly question.
Thank you all,
Jaqueline
Em segunda-feira, 17 de março de 2014 16h30min59s UTC+1, David Fanning escreveu:
> Jahvasc writes:
>
>
>
>> 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.
>
>
>
> Remove the WINDOW keyword on you AL_Legend command.
>
>
>
> 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.")
|
|
|