Topic: Custom interpolation?

Is it possible for a user to create a new interpolation type for Point Series? maybe through a plugin or something?

Or do you recommend creating a custom function instead, and putting it atop the Point Series?

I need to illustrate binary data and would like to have a step-type line between my points, something like this, with points symbolized as 'o'.

        o_____         o_______
        |          |         |
o___|          o____|

Thanks

Re: Custom interpolation?

This is not directly possible. However you can create a point series with linear interpolation with the points where you want the line to break like this:

        o____ o        o_______
        |          |         |
o___o         o____o

Re: Custom interpolation?

Fair enough, I'll see if I can manage to tweak my data to add those points.

Speaking of which, this binary data is taken out of datalogging, quite a large volume. I wanted to work on a big chunk of that data at once, about 6 million points (172Mb worth of .txt file) and Graph reported it ran out of memory when I tried to import the points from a .txt file. I had to cut the data in a few 40Mb (1.2 million points) subfiles for Graph to succeed at importing and showing, but working with that data would give "EEFFACE" errors on every click in the "edit point series" window.

1) According to you, is this behavior kinda expected with that volume of data? What size of data would you consider "safe" to work with in Graph? I'd automate the splitting of my data files to that size.

2) Is the mentioned memory software-limited with Graph? or is it hardware-limited with my machine?

Thanks again!

Re: Custom interpolation?

What version of Graph are you using? I thought I had fixed the problem the EEFFACE error.

I never imagined anyone would try to import 6 million points. I have tested Graph 4.4.2 with importing 300,000 points, but much more than that will probably give you the out of memory error. It might help to set Max undo steps to 0 in the Edit|Options dialog so Graph doesn't have to remember how to undo changes to the huge data.

32 bit Windows programs have a 2 GB limit for the address space no matter how much physical memory you have. But as I never imagined anyone would have more than a few thousand points, Graph is not optimized for handling huge amounts of data. I expect this will improve when I get Graph ported to 64 bit, which does not have the 2 GB limit.

Re: Custom interpolation?

Graph 4.4.2 Build 543

I have encountered EEFFACE errors on some occasions. If I recall correctly, I have only seen EEFFACE when interacting with Point Series I had altered (removed from FunctionList and then appended the modified element) using my own Python scripts, so I'd be more inclined to think the problem is on my side. What does that error mean?

I'm conscious of the fact I was pushing Graph and Windows close to or beyond their limits. I will be a bit less lazy and work on smaller data chunks wink

I'll also check with your trick by setting "Max undo steps" to 0.

Re: Custom interpolation?

In short the EEFFACE message indicates a problem in the error handling in Graph, so I better take a look at it again. A more useful error message would be an improvement.

Re: Custom interpolation?

If anyone needs to do this step-type line mentioned earlier in this thread, this subroutine works for me:

def PtSeriesWithStepLine(Series):
    SeriesXValues = []
    SeriesYValues = []
    NumberOfInsertedPoints = 0 #initialization of a self descriptive counter.

    for i in range(len(Series.Points)):
        SeriesXValues.append(Series.Points[i][0])
        SeriesYValues.append(Series.Points[i][1])
    
    for i in range(len(SeriesXValues)-1):
        if SeriesYValues[i] != SeriesYValues[i+1]: #if y-coord of point i is different from y-coord of point i+1
            NewPoint = (SeriesXValues[i+1],SeriesYValues[i]) #Create a new point (2-tuple). That new point has for x- and y-coord respectively, the x-coord of point i+1 and the y-coord of point i.
            Series.Points.insert(i+1+NumberOfInsertedPoints,NewPoint)#insert the new point in the extended points list between points i and i+1. The positioning iterator is altered by the number of points that have been inserted in the list so far during the present loop.
            NumberOfInsertedPoints+=1
    return Series

It's only the subroutine, not the entire plugin. Using this on your data will make it so there will only be horizontal and vertical lines (thus creating steps) connecting your points together. I used it on binary data (only 0 and 1).