help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: plot save time scales with plot complexity


From: Damian Harty
Subject: RE: plot save time scales with plot complexity
Date: Fri, 30 Mar 2012 12:07:28 +0000

Be careful with straight decimation, saying it "loses detail" is a bit of 
understatement. What's really needed is an algorithm that plots the max and min 
within the "one pixel wide" bin of points. 

Alas I don't have one, but I do have experience of some rather infuriating 
software in which the "overview" of the data was useless beyond words, 
requiring a zoom in and moronic scrolling to find occasional outlying events in 
a generally quiescent system. 

Damian Harty 
Senior Research Fellow
Coventry University
+44(0)24 7688 8924
+44(0)7799 414832


-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Przemek Klosowski
Sent: 29 March 2012 18:44
To: address@hidden
Subject: Re: plot save time scales with plot complexity

On 03/28/2012 05:43 PM, BobM wrote:

> If I make the plot more complicated, but with the same number of points
> t = (1:100000)
> b = sin(2*pi*t/1000)
> plot(t,b)
> et to save ~ 19 sec
> b = sin(2*pi*t/100) time to save as png goes to ~ 50 sec.

For what it's worth, on my 2.3 GHz Linux box it takes 6 and 1.6 seconds 
respectively as measured by tic(),print 'test.png' -dpng,toc().

In any case, you are trying to plot 100,000 points in a space of 500 or 
so pixels; I would suggest trimming your data by either simple decimation:

decVec=1:100:100000;
plot(t(decVec),b(decVec))

which of course loses detail, especially for a periodic function like 
you had. If you are concerned, average the data over those intervals:

ts=sum(reshape(t,100,1000))/100
bs=sum(reshape(b,100,1000))/100
plot(ts,bs)

which for this data is still wrong, but understandable, and it makes 
sense in general case.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave



reply via email to

[Prev in Thread] Current Thread [Next in Thread]