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

Home » Public Forums » archive » Re: cgHistoPlot - locations and histdata keywords?
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: cgHistoPlot - locations and histdata keywords? [message #79632 is a reply to message #79630] Fri, 16 March 2012 13:43 Go to previous message
David Fanning is currently offline  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.")
[Message index]
 
Read Message
Read Message
Previous Topic: Cumulative max() in *arbitrary* dimension?
Next Topic: how to extend a vector from size A to size B, (A<B) without "damage" the data in A

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

Current Time: Fri Oct 10 22:51:07 PDT 2025

Total time taken to generate the page: 0.47975 seconds