A table becomes points, and the points become a formula. Most of what follows
comes from one reader's report, and the last piece of it from a second reading
of the panel with that report in hand.
Data from the editor
Select a pair of columns in a csv and the points appear on the canvas while you
are still making the selection. No key to press. The next selection replaces
what is shown, so nothing piles up; Alt+Shift+G keeps it for good, as an
ordinary row of the list.
The separator is worked out from the data rather than asked for: a semicolon, a
tab, a comma or a space, whichever splits the rows into numbers. A decimal comma
is not mistaken for a separator - 1,5;2,5 is two numbers, not four halves. A
first row that is not numeric is a header, and it names the series.
Points are drawn as points. A line between measurements would draw values where
nothing was measured, and a reader would take it for the behaviour of the
quantity.
A formula fitted to the points
A straight line, a polynomial of the second to the fifth degree, exponential,
power or logarithmic. The result is an ordinary formula string, which is why
everything already in the panel works on it: tracing, extrema, intersections,
the report, bookmarks, the share link.
The caveats are shown beside the answer, not left to the documentation:
- R^2 grows with the number of coefficients by itself. A polynomial of high
degree passes through every point and means nothing. - The exponential, power and logarithmic fits are computed through logarithms,
so what comes out least is the deviation of the logarithms rather than of the
values. R^2 is nevertheless computed on the original values. - Least squares is sensitive to outliers: one distant point pulls the curve.
The family is chosen by the person, not by us on the best R^2. Chosen that way
the answer would almost always be the same one - a polynomial of the fifth
degree - and it would be the most overfitted.
Undo
Ctrl+Z, or the button next to the bin, takes back the last destructive action:
clearing the panel, removing a curve or a series, a fit. Twenty steps, and the
tooltip names what will be undone.
There is one thing undo does not cover, and it is worth saying plainly: writing
over a bookmark slot. The slot lives at the host, and the page cannot bring its
contents back.
From the report
- The colour you pick is the colour the curve is drawn in. While "a colour of
its own for every formula" was set, the chosen colour was not used at all. - A bookmark slot stays occupied after you restore from it. Restoring used to
free it, so click after click went remember - restore - remember.Ctrl+click
writes over a slot,Shift+clickclears it. - Printing puts the whole report on paper, not the part that happened to be
visible. The graph is printed too, on a page of its own. - Clear stands at the end of the row, behind a separator, with undo before it.
It used to sit between Print and Report. It now clears the whole panel, series
included, and its caption says so.
The panel says why it is empty
Without the WebView2 runtime the panel used to stay blank with nothing to read.
It now names the reason - the runtime is missing, the loader was not created, or
it did not come up in time - and says where to look next.
Upgrading from 1.2.1
The panel was registered under the wrong menu entry. With one entry in the menu
that pointed nowhere and did nothing; this release adds a second entry, and
Notepad++ remembers the wrong number from before. The first start after the
upgrade may therefore not open the panel by itself.
Open it once from Plugins - Graph Builder and the editor remembers the right
one. Alt+Shift+G opens the panel too if it is not up yet.
Building it yourself
The README now carries an Installation section: the plugin from an empty
folder, with both compilers, each of them by script and by hand. Every command
in it was run from a clean clone before this release went out, which is how
three of them turned out to need changing - a third-party checkout that has to
be pinned to a tag, a step that quietly changed the resulting library, and a
command line that falls apart in PowerShell.
build-lazarus.ps1 no longer wants a Lazarus configuration of your own. It used
to look for one in three fixed places and stop when it found none - which is
every machine where Lazarus is installed and its IDE has never been started, the
very machine these instructions are for. It now starts from an empty one and
lets lazbuild fill it in from the installation. That settles a quieter fault as
well: where a configuration was found, the build obeyed it rather than
LAZARUS_DIR, so a stale one could send the build to a different Lazarus
without saying so.
The two libraries underneath carry the same section.
Compatibility
| Delphi | 11 Alexandria through 13, win32 and win64 |
| Lazarus / Free Pascal | Lazarus 3.6.0 with Free Pascal 3.2.2, win64 |
Download
GraphBuilder-npp-1.3.0-win64.zip - 1 449 860 bytes, sha256
19f2d1651d5dcbf52417a61e9219dee65ae2b07ea7337736487878b110a3a291
Close Notepad++, unpack the archive into a folder named GraphBuilderLaz inside
the editor's plugins folder, and start it again. The folder has to carry that
name: Notepad++ does not look inside a folder whose name does not match the
library.