Re: cgHistoPlot - locations and histdata keywords? [message #79632 is a reply to message #79630] |
Fri, 16 March 2012 13:43  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Barry Lesht writes:
> Hi - I'm having problems using cgHistoPlot in a re-sizable graphics window.
>
> For example,
>
> cgWindow, xwsize=xSize, ywsize=ySize
> cgWindow, 'cgHistoPlot', data, binsize=1., LOCATIONS=locs, HISTDATA=hists, /LoadCmd
> HELP, locs, hists
> cgWindow, /ExecuteCmd
>
> Yields,
> LOCS UNDEFINED = <Undefined>
> HISTS UNDEFINED = <Undefined>
>
> There is an old post referring to what looks like a similar problem; is there a simple way around it?
The simple way to work around it, of course, is to first
do the command in a regular display window, where there
is no issue in returning keywords. I would use a pixmap
window, probably, if I didn't want anyone to see it:
IDL> data = cgDemoData(7)
IDL> cgDisplay, /Pixmap, /Free
IDL> cgHistoPlot, data, binsize=1., LOCATIONS=locs, HISTDATA=hists
IDL> WDelete, !D.Window
IDL> Help, locs, hists
LOCS INT = Array[256]
HISTS LONG = Array[256]
Then you can proceed normally with the values you need.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|