y=f(x) graph plot - ruby
Posted: Mon Jan 25, 2016 10:36 am
Among graphs that I'm missing is something, that performs simple drawing operation: y=f(x). Sometimes it is useful for signal shape reconstruction/prediction from data points.
In general, there could be 2 variants of this. One, that draws y points at x coordinates, and draws point-to-point (straight) line. The other one - could draw vertical bars with y heights at given x coordinates. As input, such graphs require 2 arrays (x and y coordinates).
Among other parameters:
1) while basically I need simple positive graph, a switch for positive/bipolar display could be useful too.
2) y range limiter
3) x min and x max range limiter
4) linear/log display switch
Anyone played with this?
The catch with data is, that x coordinates are irregular.
In general, there could be 2 variants of this. One, that draws y points at x coordinates, and draws point-to-point (straight) line. The other one - could draw vertical bars with y heights at given x coordinates. As input, such graphs require 2 arrays (x and y coordinates).
Among other parameters:
1) while basically I need simple positive graph, a switch for positive/bipolar display could be useful too.
2) y range limiter
3) x min and x max range limiter
4) linear/log display switch
Anyone played with this?
The catch with data is, that x coordinates are irregular.