direct graphics or object graphics ? [message #60172] |
Tue, 06 May 2008 12:59  |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
Hi people,
I'm a student programming a software for analysis and visualisation of
some kinds of data. In my interface I want to show some plots.
I have an object for do OPLOTs using object graphics but I dont know
if is better to use object graphics when I'll try to plot more than
1000 plots.
I think programming in object graphics is better than direct graphics
but Im not sure.
Any opinions ????
Thanks,
Bernat
|
|
|
Re: direct graphics or object graphics ? [message #60292 is a reply to message #60172] |
Wed, 07 May 2008 15:48   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mark writes:
> I'm with Bernat: even with large datasets, drawing all the data as
> line plots can be useful as a quick way of distinguishing sparsely
> populated regions of the parameter space from densely populated
> regions, and for detecting outliers.
>
> I recall that back in 1994 or so I used IDL to plot several time
> series of air pollution data, with ~ 10^6 points per time series, and
> saw stuff in there that others had not seen, because they were stuck
> with puny spreadsheet-based plotting tools. ... That would have been
> Direct Graphics, BTW :-)
I suppose with object graphics you could look at this
traffic accident in 3D space, too, and notice how high
the stack was growing as you piled one thing on top of
another. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: direct graphics or object graphics ? [message #60293 is a reply to message #60172] |
Wed, 07 May 2008 15:41   |
Mark[1]
Messages: 66 Registered: February 2008
|
Member |
|
|
On May 7, 10:53 pm, Spon <christoph.b...@gmail.com> wrote:
> Bernat wrote:
>> for i=0, 1000 do oplot, datax[i,*], datay[i,*]
>> Drawing all the plots is a good idea for analyse the data.
>
> Something tells me there are several people you've yet to convince of
> this ;-) (myself included). Just out of curiosity, what are you trying
> to visualise in this way? I'd be interested to know how sparsely
> scattered a dataset would need to be for this method to give you
> something other than a headache. :-)
I'm with Bernat: even with large datasets, drawing all the data as
line plots can be useful as a quick way of distinguishing sparsely
populated regions of the parameter space from densely populated
regions, and for detecting outliers.
I recall that back in 1994 or so I used IDL to plot several time
series of air pollution data, with ~ 10^6 points per time series, and
saw stuff in there that others had not seen, because they were stuck
with puny spreadsheet-based plotting tools. ... That would have been
Direct Graphics, BTW :-)
|
|
|
Re: direct graphics or object graphics ? [message #60307 is a reply to message #60172] |
Wed, 07 May 2008 03:53   |
Spon
Messages: 178 Registered: September 2007
|
Senior Member |
|
|
Bernat wrote:
> for i=0, 1000 do oplot, datax[i,*], datay[i,*]
David Fanning wrote:
> until I get my head around why in
> the world someone would want to do this, I can't really
> thing about how I would implement the mess. :-)
Jean H wrote:
>> ... I
>> doubt anyone has a brain large enough to capture, remember, analyze and
>> correlate to your original data that many plots at once!
>> Jean
Bernat writes:
> This is not the problem,
> Drawing all the plots is a good idea for analyse the data.
Something tells me there are several people you've yet to convince of
this ;-) (myself included). Just out of curiosity, what are you trying
to visualise in this way? I'd be interested to know how sparsely
scattered a dataset would need to be for this method to give you
something other than a headache. :-)
Regards,
Chris
|
|
|
|
|
|
|
Re: direct graphics or object graphics ? [message #60313 is a reply to message #60172] |
Tue, 06 May 2008 13:47   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
nata writes:
> In Direct Graphics you can do that:
>
> plot, x, y, xrange=....
> for i=0, 1000 do oplot, datax[i,*], datay[i,*]
Well, you *can* do that. The real question is,
Do you *want* to!?
Have you tried it? What does it look like (other
than a mess, of course)?
> I want to the same in object graphics and I dont know what is the best
> way. I'll try to create 1000 IDLgrPlots for each 'oplot' and add this
> in the oModel object. Is this a good idea?
I'm not sure this will look a whole lot better in
object graphics, even if it worked. Why do you want
to do this in object graphics?
Creating thousands of objects in often NOT a good idea
in object graphics. But until I get my head around why in
the world someone would want to do this, I can't really
thing about how I would implement the mess. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: direct graphics or object graphics ? [message #60315 is a reply to message #60172] |
Tue, 06 May 2008 13:40   |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
On May 6, 4:32 pm, David Fanning <n...@dfanning.com> wrote:
> nata writes:
>> There are any problems with virtual memory when I've more than 1000
>> IDLgrPlots and I want to draw my View?
>
> You want to draw 1000 line plots at the same time!
> How big is your display? Are you displaying this
> on the side of the MGM Grand in Las Vegas?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
jajajaj, no, no
In Direct Graphics you can do that:
plot, x, y, xrange=....
for i=0, 1000 do oplot, datax[i,*], datay[i,*]
I want to the same in object graphics and I dont know what is the best
way. I'll try to create 1000 IDLgrPlots for each 'oplot' and add this
in the oModel object. Is this a good idea?
|
|
|
|
|
|
|
|
Re: direct graphics or object graphics ? [message #60902 is a reply to message #60780] |
Mon, 16 June 2008 07:06  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
David Fanning <news@dfanning.com> writes:
> Bill Triplett writes:
>
>> On the machine I'm rendering on, this wouldn't be a problem except that
>> IDL does not seem to relinquish that memory after the view has been
>> rendered and the objects destroyed. Its only after the IDL process quits
>> that the memory is recovered by the OS. This seems contrary to the way
>> IDL manages its heap.
>
> It is contrary to the way IDL manages its heap, but the
> heap is already in process memory anyway. But not
> relinquishing memory is standard operating procedure, as
> far as I know, for any program written in C and using
> malloc and free to allocate and free memory.
David, I believe that most modern malloc()/free() implementations
*can* relinquish memory back to the system -- at least under Unix --
but it may not always be obvious when it can and when it can't.
The most obvious example would be a function with no side effects,
that temporarily uses a lot of memory. During the function call, some
additional memory is allocated from the top of the heap, and after the
function is finished, the heap can be reset to its original size.
However, such behavior is highly dependent on your system and your
call pattern, so it will not *always* hold. (i.e. it's the memory
fragmentation problem)
Craig
|
|
|