Description:
The Axes can now be boxed (connected in the bottom left corner) and supports labels. In addition the previous restrictions no longer apply (Nothing can be ploted if the x-axis is shorter than 0.1 units, Does not currently handled axis that do not include 0).
The Grid handles the ticks and grid lines, when setting the ticks you can either give a number or an array, in the case of a number it is interpreted by D3.js as your preference and D3 then returns a nice tick sequence of a length around the supplied number, in the case of an array the ticks are set to the supplied array. Additional grid lines between ticks can be specified as a number.
Plots can now be made along any axis even "undefined" ones, but only the parts of the result that are within the x and y axis are shown. Optimization if set, is done by detecting extremum and areas where the function is undefined and increasing the resolution by a factor of ten in these areas. When hovering the mouse over a function the dots used to generate it will be visible.
Scatter plots have been implemented, it can plot sets of points of a single colour (I have tested 10,000 points at once) supplied in a x-coordinate and a(n) y-coordinate array. By supplying a group multiple colours can be assigned the same plot, useful when deleting. The parameter ScaleAxes scales the x and y axis to the x-coordinate and the y-coordinate array.
In the Test Script a function named ScatterImage makes scatter plots from image files by using Gdip.ahk (be careful, when I first tested it I ended up having it calculate 3.5 m circles, keep the resolution reasonable)
Changes:
- Restructuring of the JavaScript for easier expansion.
- Axes have been seperated from the Chart "class".
- Data evaluation have been centralised in a new "class".
- LinePlot doesn't draw anything anymore, instead it relies on the function DrawLine.
- SVGraph_Chart all gui handling have been removed.
- SVGraph_CreatAxes renamed to SVGraph_SetAxes and now includes the option to join the axes in the bottom left corner.
- SVGraph_LinePlot has been exstended with the parameters Axis and optimize.
- New Functions:
- SVGraph_UpdateChart allows change to dimension set in the original Chart object.
- SVGraph_SetGrid sets the number of ticks on an axis and grid lines.
- SVGraph_SetLables sets the lable of an axis.
- SVGraph_ScatterPlot given an array of x coordinates and an array of y coordinates it generates circles at coordinate sets of the two.
- SVGraph_Group used to group scatter plots together.
Issues:
- Can't detect saddle points with limits the optimisation of certain function.
- I am unsure of how to handle the margin and the placement of labels, for reasons related to aesthetic and ease of use.
- There is a problem with grid lines when the first or last tick is not shown.
- And probably a lot of other issues.
As per tradition here are some questions:
Is it ok to call it optimize even though it's not really any faster just "better" ?
Should I ensure that nothing is drawn in the margin even though it may look less appealing ?
I am sure I have forgotten something and there will be bugs, since the JS script has been extended by about 400 lines (and because I am currently learning the language).
Please excuse my spelling I am dyslexic.