I've been working on this tool for some 5-7 days already, still enhancing it. It's as yet pretty basic, but can already boast some functionality... So what's that?
----------------------------------
PURPOSE
----------------------------------
AMSGraph, as the name suggests, is to make graphs (2-D plots) in the Cartesian coordinates (X, Y axes). It does basically the same as MS Office Graph: given a set of Y values, it draws a simple 2-D plot on the AMS window. That's it. As yet the tool can only plot Y values, using the X values as "labels" (just as Excel 2007 does by default, when selecting a single-dimension array of values and pressing the Graph button). But more features are coming...
----------------------------------
REALIZED FEATURES
----------------------------------
- Resizable window. The user can resize the AMSGraph window to make the graph larer / smaller. So far I've failed to make AMS redraw the graph on resize automatically, because there seems to be some problem with page/object redrawing when OnSize fires; so one has to press the Build button every time after resizing the window.
- Graph engine. The main "engine" is the single MakeGraph function that uses the powerful WinAPI plugin (by Reteset) to draw the graph. The function uses one argument - the all-in-one Settings associative array (structure) that contains settings for the graph field, axes, graph and grid.
- Import data. As yet, importing from a text file is possible. The values in the text file must come in a row (separated by carriage returns). The decimal separator can be a dot or a comma. Values imported for the X axis will be treated as labels, not numbers.
- Settings. The tool boasts flexible settings for the graph (such as showing / hiding lines, markers, tweaking colors and sizes for all graph elements, using gradients for the field [thanks to the Gradient plugin by Reteset], adjusting the Grid, etc.) AMSGraph uses an INI file to load / save default settings; at runtime, these settings are handled by the Settings array.
- Graph exporting. The user can export the graph as an image (BMP, JPG or PNG). For that purpose, RizlaUK's capture DLL was employed. Again, exporting is configurable: one can set the export path, choose to overwrite / not to overwrite existing files, or even enable / disable AutoExport, which fires exporting at a given time interval.
----------------------------------
COMING FEATURES
----------------------------------
- Ability to make multiple graphs. As yet, only 1 graph is possible.
- Math functions. Currently I'm trying to implement MATLAB functionality into AMS using the DLL interface. I am conning the MATLAB SDK and have already built numerous executables that can perform complicated math operations. In AMS, I want a feature that would simply solve a string like "1+1/sin(15.1) - 2*int(23,1,0) + log(12,1)" and return a numeric result. In MATLAB, that is possible via the "eval" function that evaluates any string. But in order to make that work in AMS, an intermediary DLL must be compiled that could convert between MATLAB and standard C data types.
- Global settings. Not that difficult to make, but right now I'm kind of lazy.
- Graph types. Not just 2-D plots, but charts, scatterplots, histograms, etc. Again, rather easy with WinAPI.
- Some analysis functions, like putting in trends to the graphs, etc.
- Something else? Your suggestions will be valued.
----------------------------------
THANKS
----------------------------------
To all AMS forum guys and IR staff. Many thanks to Reteset for the powerful plugins (WinAPI, Gradient, SpinButton) and RizlaUK for the handy Capture DLL.
----------------------------------
DEPLOYED
----------------------------------
Full installer made by me in AMS. Hope you'll find it easy and bugless
The EXE is about 6.8 MB (the ZIP is 6.6)
Main window:
ExportGraph.png
Graph Settings Dialog:
ExportGraph_settings.png
Take HERE.


Reply With Quote
