Re: cgHistoplot and multiplot [message #79816] |
Mon, 09 April 2012 15:05  |
DAVIDE LENA
Messages: 22 Registered: September 2011
|
Junior Member |
|
|
Shame on me...Thanks! :)
On Monday, April 9, 2012 5:01:24 PM UTC-4, David Fanning wrote:
> DavidL writes:
>
>> I updated cgHistoplot and multiplot to the latest versions. Still I get garbage in output.
>> When I plot on the x terminal I see just the x and y axis (and the y axis are not really the same and they both have labels). No data are shown.
>>
>> When I plot on ps device I see the data. The y axis is in common but with different scales. They both have labels and the title "Relative Frequency".
>
> You are drawing the histogram bars in black. I presume
> on your terminal you are drawing in a window with a black
> background. The bars might be hard to see. :-)
>
> I would remove the DataColorName keyword from your
> cgHistoplot commands and let cgHistoplot choose
> an appropriate color. (Or, erase with a white color.)
> Does that help?
>
> If you want the Y range to be the same for the two
> plots, you can make them the same by using the same
> values with the YRANGE keyword.
>
> If you want to turn the Y axes labelling off, set
> the YTICKFORMAT to '(A1)', rather than what you have.
>
> This code works for me:
>
> erase
> val1 = cgdemodata(5)
> val2 = cgdemodata(7)
> multiplot,[2,1]
> cgHistoplot, val1, yrange=[0,0.5], /FREQUENCY, $
> YTICKFORMAT='(A1)', YTitle='', DataColor='opposite'
> multiplot
> cgHistoplot, val2, yrange=[0,0.5], /FREQUENCY, $
> YTICKFORMAT='(A1)', YTitle='', DataColor='opposite'
> multiplot,[1,1],/init,/verbose
> end
>
> 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.")
|
|
|
Re: cgHistoplot and multiplot [message #79817 is a reply to message #79816] |
Mon, 09 April 2012 14:01   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
DavidL writes:
> I updated cgHistoplot and multiplot to the latest versions. Still I get garbage in output.
> When I plot on the x terminal I see just the x and y axis (and the y axis are not really the same and they both have labels). No data are shown.
>
> When I plot on ps device I see the data. The y axis is in common but with different scales. They both have labels and the title "Relative Frequency".
You are drawing the histogram bars in black. I presume
on your terminal you are drawing in a window with a black
background. The bars might be hard to see. :-)
I would remove the DataColorName keyword from your
cgHistoplot commands and let cgHistoplot choose
an appropriate color. (Or, erase with a white color.)
Does that help?
If you want the Y range to be the same for the two
plots, you can make them the same by using the same
values with the YRANGE keyword.
If you want to turn the Y axes labelling off, set
the YTICKFORMAT to '(A1)', rather than what you have.
This code works for me:
erase
val1 = cgdemodata(5)
val2 = cgdemodata(7)
multiplot,[2,1]
cgHistoplot, val1, yrange=[0,0.5], /FREQUENCY, $
YTICKFORMAT='(A1)', YTitle='', DataColor='opposite'
multiplot
cgHistoplot, val2, yrange=[0,0.5], /FREQUENCY, $
YTICKFORMAT='(A1)', YTitle='', DataColor='opposite'
multiplot,[1,1],/init,/verbose
end
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.")
|
|
|
Re: cgHistoplot and multiplot [message #79818 is a reply to message #79817] |
Mon, 09 April 2012 13:00   |
DAVIDE LENA
Messages: 22 Registered: September 2011
|
Junior Member |
|
|
I updated cgHistoplot and multiplot to the latest versions. Still I get garbage in output.
When I plot on the x terminal I see just the x and y axis (and the y axis are not really the same and they both have labels). No data are shown.
When I plot on ps device I see the data. The y axis is in common but with different scales. They both have labels and the title "Relative Frequency".
On Monday, April 9, 2012 2:53:34 PM UTC-4, David Fanning wrote:
> DavidL writes:
>
>> I am trying to use cgHistoplot with multiplot but I can't have it working properly.
>> My plotting code is
>>
>> erase
>> multiplot,[2,1]
>> cgHistoplot, val1, /FREQUENCY, YTICKFORMAT='(F4.2)', DATACOLORNAME='Black', YTITLE=''
>> multiplot
>> cgHistoplot, val2, /FREQUENCY, YTICKFORMAT='(F4.2)', DATACOLORNAME='Black', YTITLE=''
>> multiplot,[1,1],/init,/verbose
>>
>> Any hint?
>
> It looks like it is working to me. Do you have the latest
> versions of both Multiplot and cgHistoplot?
>
> What makes you think it is NOT working?
>
> 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.")
|
|
|
Re: cgHistoplot and multiplot [message #79819 is a reply to message #79818] |
Mon, 09 April 2012 11:53   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
DavidL writes:
> I am trying to use cgHistoplot with multiplot but I can't have it working properly.
> My plotting code is
>
> erase
> multiplot,[2,1]
> cgHistoplot, val1, /FREQUENCY, YTICKFORMAT='(F4.2)', DATACOLORNAME='Black', YTITLE=''
> multiplot
> cgHistoplot, val2, /FREQUENCY, YTICKFORMAT='(F4.2)', DATACOLORNAME='Black', YTITLE=''
> multiplot,[1,1],/init,/verbose
>
> Any hint?
It looks like it is working to me. Do you have the latest
versions of both Multiplot and cgHistoplot?
What makes you think it is NOT working?
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.")
|
|
|
Re: cgHistoplot and multiplot [message #80615 is a reply to message #79817] |
Thu, 28 June 2012 10:38  |
DAVIDE LENA
Messages: 22 Registered: September 2011
|
Junior Member |
|
|
BTW, this code does not work for me:
erase
val1 = cgdemodata(5)
val2 = cgdemodata(7)
multiplot,[2,1]
cgHistoplot, val1, yrange=[0,0.5], /FREQUENCY, $
YTICKFORMAT='(A1)', YTitle='', DataColor='opposite'
multiplot
cgHistoplot, val2, yrange=[0,0.5], /FREQUENCY, $
YTICKFORMAT='(A1)', YTitle='', DataColor='opposite'
multiplot,[1,1],/init,/verbose
end
On Monday, April 9, 2012 5:01:24 PM UTC-4, David Fanning wrote:
> DavidL writes:
>
>> I updated cgHistoplot and multiplot to the latest versions. Still I get garbage in output.
>> When I plot on the x terminal I see just the x and y axis (and the y axis are not really the same and they both have labels). No data are shown.
>>
>> When I plot on ps device I see the data. The y axis is in common but with different scales. They both have labels and the title "Relative Frequency".
>
> You are drawing the histogram bars in black. I presume
> on your terminal you are drawing in a window with a black
> background. The bars might be hard to see. :-)
>
> I would remove the DataColorName keyword from your
> cgHistoplot commands and let cgHistoplot choose
> an appropriate color. (Or, erase with a white color.)
> Does that help?
>
> If you want the Y range to be the same for the two
> plots, you can make them the same by using the same
> values with the YRANGE keyword.
>
> If you want to turn the Y axes labelling off, set
> the YTICKFORMAT to '(A1)', rather than what you have.
>
> This code works for me:
>
> erase
> val1 = cgdemodata(5)
> val2 = cgdemodata(7)
> multiplot,[2,1]
> cgHistoplot, val1, yrange=[0,0.5], /FREQUENCY, $
> YTICKFORMAT='(A1)', YTitle='', DataColor='opposite'
> multiplot
> cgHistoplot, val2, yrange=[0,0.5], /FREQUENCY, $
> YTICKFORMAT='(A1)', YTitle='', DataColor='opposite'
> multiplot,[1,1],/init,/verbose
> end
>
> 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.")
|
|
|
Re: cgHistoplot and multiplot [message #80616 is a reply to message #79817] |
Thu, 28 June 2012 10:17  |
DAVIDE LENA
Messages: 22 Registered: September 2011
|
Junior Member |
|
|
I had cgHistoplot working fine with multiplot for a while. At some point it stopped working...
I have the updated versions of multiplot and cgHistoplot.
What is happening is that all the histograms are drawn on the same reference frame and only one reference frame is represented. Though multiplot works perfectly well when I use just plot. I also tried to overplot the histogram but it does not work.
I am running something like that:
SET_PLOT, 'x'
erase
multiplot,[1,3]
cgHistoplot, map1, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', /OUTLINE
multiplot
cgHistoplot, map2, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', YTITLE='', /OUTLINE
multiplot
cgHistoplot, map3, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', XTICKFORMAT='(F5.1)', YTITLE='', /OUTLINE
multiplot,[1,1],/init,/verbose
Any suggestion?
On Monday, April 9, 2012 5:01:24 PM UTC-4, David Fanning wrote:
> DavidL writes:
>
>> I updated cgHistoplot and multiplot to the latest versions. Still I get garbage in output.
>> When I plot on the x terminal I see just the x and y axis (and the y axis are not really the same and they both have labels). No data are shown.
>>
>> When I plot on ps device I see the data. The y axis is in common but with different scales. They both have labels and the title "Relative Frequency".
>
> You are drawing the histogram bars in black. I presume
> on your terminal you are drawing in a window with a black
> background. The bars might be hard to see. :-)
>
> I would remove the DataColorName keyword from your
> cgHistoplot commands and let cgHistoplot choose
> an appropriate color. (Or, erase with a white color.)
> Does that help?
>
> If you want the Y range to be the same for the two
> plots, you can make them the same by using the same
> values with the YRANGE keyword.
>
> If you want to turn the Y axes labelling off, set
> the YTICKFORMAT to '(A1)', rather than what you have.
>
> This code works for me:
>
> erase
> val1 = cgdemodata(5)
> val2 = cgdemodata(7)
> multiplot,[2,1]
> cgHistoplot, val1, yrange=[0,0.5], /FREQUENCY, $
> YTICKFORMAT='(A1)', YTitle='', DataColor='opposite'
> multiplot
> cgHistoplot, val2, yrange=[0,0.5], /FREQUENCY, $
> YTICKFORMAT='(A1)', YTitle='', DataColor='opposite'
> multiplot,[1,1],/init,/verbose
> end
>
> 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.")
|
|
|