On Jul 28, 7:51 am, gr...@technologyworks.co.nz wrote:
Quote:
I'm trying to use a scatter chart to plot level reading for a pump
station level sensor.
>
The sensor takes a reading every 4 seconds, and there are 23,000
reading per chart
>
There appears to be a limit of 4000*4000 data points in MS Chart so I
have had a play with the Office 10 activX chart control, but cant get
that to plot the data at all. It always try to summaries the data for
some reason fathomable only to Bill Gates! Mind you, the MS Graph
wizard does the same, but at least I can work around this wizard, but
with the active X one I cant seem to specify X and Y data sets without
them being summarised.
>
So how can I reduse my dataset down to less than 4000 records to use
the MS Graph object.
>
Here is a sample of the data
>
DateTime Level1
07/09/07 13:22:06 2.96
>...
07/09/07 13:29:46 3.49
07/09/07 13:29:50 3.51 high point
07/09/07 13:29:54 3.51 high point
07/09/07 13:29:58 3.51 high point
07/09/07 13:30:02 3.49
...
07/09/07 13:32:46 3
>
Its a sewerage pump stations, so we have inflow that fills the pump
chamber until the water level hits the start float and the pump kicks
in. This will draw the water level down untill the stop float turns
the pump off and the level starts rising again. This cycle continues
through out the monitoring period.
>
I'm only interested in the highs and lows, but the problem is that due
to the wave action and sensitivity of the sensor, the difference in
level between consecutive readings cant be used to identify the top or
bottom of each cycle as it may just be a "false" high.
>
So, how do I filter out the intermediate records so I have just the
highs and lows with the date time against each?
>
Cheers
>
Grant
I wrote a little program to do a scatter plot output to pdf format:
http://personalwebs.oakland.edu/~for...catterPlot.pdf http://personalwebs.oakland.edu/~for...catterPlot.zip
Notes:
1) Provided "as is"
2) Use at your own risk
3) Ignore the warning when opening Acrobat Reader. This has never
caused me any problems. Acrobat Reader is simply "fixing up" the
file.
4) The data point shape should be chosen using a combobox instead of
being hard coded.
5) The software is not polished and should be considered experimental.
6) The software assumes Acrobat Reader is installed in the default
installation directory.
7) The extreme values are not placed on the graph but it is not
difficult to put that information on the graph using code.
8) The fields in any data tables must be ID, X and Y.
9) The software is written in A97 but should convert to later versions
with little or no effort.
10) The software does not expect any Null values in X or Y. (You can
also try 'WHERE X IS NOT NULL AND Y IS NOT NULL' as part of the SQL
string.)
On my (slow) computer it took about five minutes to produce a scatter
plot for 26,000 points in "efficiency" mode. I learned an interesting
thing about Access while trying this out on 30,000 data points:
For very large strings it is better to group several strings together
before appending them. E.g.,
Once strX is large,
strX = strX & "A "
strX = strX & "B "
strX = strX & "C "
is about three times slower than
strX = strX & "A B C "
It isn't intuitive to me that longer strings take longer for Access to
find out where they end. Normally, this situation could occur after
the compressed pixel information for a large image has been added to
the pdf stream. Because of the relatively intense pdf calculations
needed to draw filled circles rather than filled squares, circles take
about eight times longer than squares to create (I.e., it took about
40 minutes for 26,000 data points on my machine using circles.). I
realize that pdf output may not suit your needs. Even though all the
data points are plotted, it is possible for some data points to be
completely covered up by later data points. If you try it, let me
know if you discover any problems.
James A. Fortune
CDMAPoster@FortuneJames.com