to use pplot with ruby?
- Differences with c++
How to use pplot with
A PPlot can be controlled from ruby scripts in almost the same way as
in C++, see how to use pplot. You
already have simple plot like this
% obtain a reference to the current
pplot in a native widget calling this script
that's all! For more details, again, see the C++ documentation, but to
give you an idea
% make x/y arrays for one plotitem
% add to plot
plot.mPlotDataContainer.AddXYPlot (xdata, ydata)
% turn on grid
%set log scale for Y-axis
% widen up the borders
If you have qt, you can build the qpplotdemo in the qt directory.
Strart it like this
It should look like this.
Differences with c++
- forget all those ";"'s
- no difficult stl vectors, just ruby arrays
- comments start with "%" rather than "//"