×
Canvas not supported; please update your browser.
Models:


A = 0.12345678
B = 0.12345678
C = 0.12345678
rms Error = 0.12345678
x = 0.123456,   slope = 0.123456

X label:   X units:

Y label:   Y units:

Title:

Save graph as:

Settings
Toggle the display of grid lines on the graph.
Toggle the visibility of the data points.
Uncheck to ignore error bars when scaling the axes.
Settings are saved in the browser cache. They will revert to their default values if the browser cache is cleared.

Position the text with the mouse, then click to drop it.

Changing the model removes the fit results from the graph, but not your notes and arrows.

To draw an arrow, click first where it starts and then where it points to.

 

   

Manually draw maximum and minimum slope lines:

×
dummy text
dummy text
×
Quick Start

Enter your data in the "data" columns in the spreadsheet, label your axes using the entry fields (below the spreadsheet), and you will get a graph. Fit a line to your data by selecting a model from the choices in the middle of the page. Press the "Graph to Clipboard" button to copy your graph, and then paste it wherever you like.

Table of Contents
Entering and Copying Data

Manual Entry - Data can be entered by simply typing values into the data columns in the front panel spreadsheet. Numbers typed in the "±x" and "±y" columns will drawn as uncertainty bars on each data point. They are optional. You can navigate between cells using the arrow and enter keys. If you double click in a cell, you enter "edit mode" for that cell. In edit mode the left and right arrow keys move the cursor within a cell instead of between cells. The enter key and the up and down arrow keys take you out of edit mode. If the contents of a cell cannot be interpreted as a number, it will be colored red. If a number is very large or very small, it will be shown using scientific ("e") notation.

Pasting - Data can also be entered by copying a block of cells from a spreadsheet and pasting it in (via the ctrl-v paste command). nPlot will correctly parse a paste of one, two, or even four columns at once. Copying and pasting tab-delimitted data from a Word or Google document also works.

Bad Data - A suspect data point in an otherwise good data set can be ignored by checking its "skip" checkbox.

Swapping Columns - If you discover that you have accidentally typed your y data into the x column, just click the "Swap x & y" button. If you have any entries in the uncertainty columns, they will be swapped too. Holding down the control key while you press the swap button causes the axis labels to also be swapped.

Using Formulas - The indvidual cells understand math. If you enter 2+2, or 2*2, or 2**2, or 2^2, or 24/6, or 6-2, or 16^.5 the cell contents will be displayed as the number 4. The value is computed using the standard conventions for the order of operations. Placing the cursor in a cell recovers the original math, which allows for editing. (Double-click to enable the arrow keys inside the cell.) This can be very helpful in linearizing your data. For example, if you have measured something as a function of velocity and find that the best fit is a square law, you can then just add ^2 (or **2) at the end of each velocity entry to square it and plot your data as a straight line.

Clearing Your Data - Clicking the Clear Data button will clear the contents of the currently displayed spreadsheet. Holding down the control key while clicking it will clear all the sheets at once, as well as all the axis labeling and annotation.

Copying Your Data - nPlot makes a terrible lab notebook. If you typed your data into nPlot first, but now want it somewhere else, you can highlight the cells you want to copy (using the usual click-then-drag method), and use ctrl-c to copy the data to the clipboard. The highlighting disappears as confirmation that it has been copied. From the clipboard, you can paste the data somewhere more permanent.

Labeling and Scaling the Axes

Labeling - To label the axes, just type your labels into the appropriate text inputs. There are separate inputs for the axis units (parentheses are automatically added). There is also a text input for an optional graph title. If you need superscripts, subscripts, or any special symbols (like Greek letters), see that section of the manual.

Scaling - It is (mostly) not possible to control the scaling of the graph axes. The auto-scaling routine is quite robust, and makes reasonable choices. If the data consists of very large or very small numbers, the axis labels will automatically be drawn using scientific notation. On the Settings menu you may choose whether to include the error bars when calculating the scale. The default behavior is to use the error bars so that they are never clipped. If you de-select this option, then the scaling will be calculated using only your data points, and the error bars may be clipped (this was the default behavior prior to version 5.90). nPlot will remember your choice (until the browser cache is cleared).

Choosing a Model

Select a Model - Choose a model to match your data by clicking on the list between the data sheet and the graph. The process that nPlot uses to draw the line on the graph is known as "fitting" a curve to the data, and the curve that results is called "the fit" for that model. The "results of the fit" are constants (between one and three of them) that do the best job of making the curve pass as close as possible to all the points in the data set, which is why what nPlot draws is known as "the best fit." Be aware that every fit from nPlot is technically a "best" fit. Your job is to choose the correct model.

Deciding Which Model - An objective measure of how well the fit agrees with the data is provided by the value of the RMSE, which stands for "root mean square error." It is essentially an average of the amount by which the curve misses each data point. The general rule (also a dangerous rule) is to choose the model that gives the smallest RMSE. The reason that this is dangerous is that a quadratic fit will almost always give the smallest RMSE, but it is almost never the correct model for the data.

Advanced Models - Some of the fitting models have been declared to be "advanced" and hidden behind the Advanced Models drop-down. (Probably you should not be choosing one.) These models are rarely seen in an introductory high school physics course, and the first two are actually advanced in that they require a "non-linear fitting method" (which has nothing to do with whether the best fit curve is a straight line). These models will only work if the majority of the data has positive values for both x and y. If no curve is drawn, it means that nPlot could not find a reasonable match between the model and the data. Since we are discussing advanced things, you should know that although the uncertainties in the data points are drawn on the graph, they are not used in the fits. Weighted fits are not for beginners.

Multiple Data Sets

The spreadsheet is actually five separate sheets, selected by the row of buttons (Sheet 1, Sheet 2, etc.) at the top of the data entry grid. Each sheet supports a completely separate fitting model and has its own plotting symbol and style of fitting line. They share a single set of axis labels, and the axes will be scaled to accomodate all curves at once.

Using the Tangent Finder

The Tangent Finder does just what it says. When activated, it gives the slope of the fit at the x-value of the mouse position. By default, when the Finder is activated, the Lock To Data option is on, which restricts tangent finding to the x-values of the input data points. The x value and slope at that x value appear just below the tangent finder controls. The finder operates on whichever of the five sheets has been selected. If you want to include a tangent in your downloaded graph, slide the mouse off the top or bottom edge of the graph at the desired x-value.

Annotating Your Graph

Adding Fit Results and Notes - Clicking the Annotation button brings up the annotation menu, which will let you add information to your graph. For example, you can add the results of a fit as a block of text. The interface allows you to position that block anywhere within the graph. If you have more than one data set in your graph, you can position a separate block of text for each fit. To make it clear which block goes with which fit, you can add arrows that point from each block to the corresponding curve. If you change the model used on a data set, the annotation for the old model will automatically be erased. You can type text notes into the box on the Annotation Dialog and place them on your graph as well. (If all you care about from a fit is the slope, add the slope value and units as a Note instead of adding the whole fit.) Notes can have subscripts, superscripts, and Greek letters.

Adding Max/Min Slope Lines - If you have a linear fit on any sheet, you can use the annotation menu to manually add additional lines to the graph. This feature is intended for students who need to draw IB style graphs. The completed line is drawn using dashes, and the slope and intercept are reported in the annotation dialog. If desired, this information can manually added to the graph using the Add Note feature. You can draw as many lines as you like, and although you cannot change a line after it has been drawn, you can remove it using the Edit feature.

Editing Annotations - The Edit button will throw up a list of all the added annotations. You can select any item from the list to reposition it. When your mouse is over an item in the list, the part of the graph that will be changed is highlighted in red. If it is a Note and not a Fit, you can edit the text first. Clicking on the "×" next to an item will delete it. If you have multiple data sets and multiple annotations, clearing the data from one data set deletes that data but not the related annotations. Delete them by hand using this editing function.

Saving & Recalling Your Graphs

Saving - Your entire graph can be saved for later recall by clicking the Save Graph button. Type a name in the text input first, or nPlot will complain. If the name matches an existing saved graph, that earlier graph will be overwritten. There is no "are you sure?" warning! The graph is saved on your computer only. It cannot be accessed from any other device.

Recalling - If you click the Recall Graph button you will be shown a list of all the graphs saved in your browser. Click on a name in that list and the graph and data will be restored exactly as they were when you saved them. If nPlot detects that there is already data in the spreadsheet, it will ask before erasing your current graph and replacing it with the recalled one.

Deleting - If you hold down the shift key while clicking on a saved graph name, that graph will be deleted instead of recalled. You will not be asked if you are sure.

Impermanence - Your graphs are stored in the browser cache. If the cache is cleared for any reason you will lose all your saved graphs. Think of this graph saving feature as a convenience and not an archival record. Keep a copy of your data in e.g., a Google Sheet.

Pasting or Printing Your Graph

There are actually three separate ways to get a useful copy of your graph. Which one you should choose depends on what you want to do with the graph.

Open in a Tab - This option is designed for making a quick hard copy that you can tape into a real (made from paper!) lab notebook. Hold down the control key while pressing the "Graph to Clipboard/Graph in New Tab" button (the name changes when the control key is pressed). Your graph will appear by itself in a new tab. Print that tab to get a graph suitable for taping into a notebook.

Copy to Clipboard - Clicking the Graph to Clipboard button puts a copy of the graph in the system clipboard. From there it can be pasted into a document and printed. You can also paste it into the spreadsheet you are using as a lab notebook.

Download an Image - If you check the "Yes, download" radio button, then your graph will be downloaded as a graphics file (named using your axis labels as "y-axis_label_vs_x-axis_label.png") that you can use however you like. If you also select the "Include fit" radio button, you will get a second (plain text) file containing the fit results from all sheets (well, just the ones that have fits). If you request the text file, allow multiple downloads when you get the pop-up asking for permission.

Superscripts, Subscripts, and Symbols

Superscripts - To get a superscript in any text input (axis labels, units, plot title, or annotation notes), just precede the numerical superscript with the caret symbol "^". For example, to get v2, type v^2. Superscripts are restricted to numbers only. All digits between the caret and the first non-digit character are assumed to be part of the same superscript.

Subscripts - Unlike superscripts, subscripts can contain (almost) anything you want: plain text, Greek letters, and superscripts. However, you have to tell nPlot when the subscript starts and when the subscript ends. Subscripts start with "_{" and end with "}". For example, typing F_{net} gives Fnet. There are some restrictions. Subscripts may not have subscripts, and if your desire is to have curly brackets as part of your subscript text, that is guaranteed not to work right.

Greek and Other Symbols - To get a Greek letter, type a backslash "\" followed by the name of the Greek letter. For example, type e.g. \Delta, \delta, or \mu to get Δ, δ, or μ. If an uppercase Greek letter is the same as a character in the Roman alphabet, no translation is made. Disappointingly, typing \Alpha just gives \Alpha, not the A you were hoping for. To make it easier to read what you are typing, the first blank space between the Greek letter and the rest of the text is ignored. If actually want a space after the Greek letter, type two spaces in your input. For example, both "\DeltaL" and "\Delta L" will print as ΔL, but "\Delta L" will print as Δ L.

Special Characters - The Greek symbol processor also understands a few special characters (which means the same business about spaces applies). These characters are \deg (°), \times (×), and \sqrt (√ ).

×

Oops! nPlot cannot interpret your pasted data as numbers. Check your spreadsheet data for letters and other non-numeric characters. You can't have a unit label in the same cell as a data value.

×

nPlot v5.01

© Geoff Nunes, 2020-2023

Questions, brickbats, and requests for new features can be sent to doc at this website (noragulfa.com). Please don't expect a rapid response.

The fitting routines are adapted from Press, Teukolsky, et al., Numerical Recipes. The data grid was adapted from code by Ondřej Žára. Everything else is my fault.

Change Log

v5.91

Change: The data table can now handle as many as 100 points.

v5.90

Enhancement: Downloaded graphs are now named using the axis labels. Control characters are stripped and the graph is named using the format "x-axis_label_vs_y-axislabel.png"

New Feature: By default, the axis scaling routine now looks at the error bars and prevents them from being clipped. If this feaure is turned off, the previous behavior is recovered: scaling is done using only the data points and the error bars may be clipped.

New Feature: The settings of the show Grid and Show Data radio buttons are now stored in the browser cache, along with the setting for the new "scale using the error bars" feature. Buttons to control all three settings are on the new pop-up Settings menu accessed by a new front panel button.

Aesthetic Tweak: Front panel buttons are now shaded when the cursor hovers over them.

Bug Fix: Y axis labels were mispositioned (as a byproduct of fixing an earlier bug...).

Bug Fix: The reported slope of a manually drawn line was incorrect if the line intersected the top or bottom of the graph box.

v5.84

Bug Fix: Correct minor label placement error introduced in v5.83.

v5.83

New Feature: Ability to manually add max and min slope lines to a linear fit (for IB Physics) using Annotate dialog.

Tweak: Arrows can now be drawn right up to graph border.

Bug Fix: Correction to wording in the Annotate dialog.

v5.82

Bug Fix: Annotation arrows now actually start and end at the crosshairs.

v5.81

Bug Fix: Minisheets now scroll when selecting data below row 12.

v5.80

New Feature: Can now drag the mouse to highlight data in the spreadsheet and ctrl-c/ctrl-v to copy & paste it to a document or spreadsheet.

New Feature: Now get a notification the first time nPlot is launched or after a new version release.

New Feature: When you ctrl-click the Graph to Clipboard button, the graph opens in a new tab for ease in printing.

Enhancement: The Teacher Notes are now the User Manual which is better organized.

Enhancement: Labels on the Clear Data and Swap x & y buttons now display the correct action when the control key is pressed.

Enhancement: Better crosshairs to help in positioning annotation.

Aesthetic Tweak: The graph region is now shown as a box, even when there is no data to plot.

v5.79

Enhancement: square root symbol (\sqrt) and multiplication symbol (\times) added to text parser.

v5.78

Bug Fix: Recalling a saved graph with no annotation would break further attempts at annotation.

v5.77

Bug Fix: Certain data sets would cause the autoscaling routine to hang.

v5.76

New Feature: Inverse square root added to the advanced models list.

v5.75

Bug Fix: A (unreadable) file was downloaded even when the graph was supposed to only be copied to the clipboard.

Change: A separate radio button controls whether you get the text file with the fits.

v5.74

New Feature: The new default download behavior is to copy the graph to the clipboard. If an actual png file is required, select the "Yes, download" radio button.

v5.73

Bug Fix: Waiting for data message was not diplayed after using the Clear Data button.

v5.72

Minor aesthetic tweaks.

v5.71

New Feature: No plotting will occur until both axes have been labeled.

Enhancement: Cursor now changes to a crosshair when positioning annotation.

Bug Fix: You could not delete a fit annotation, change your mind, and immediately re-add it.

Bug Fix: Sometimes closing the annotation menu required an extra click.

Bug Fix: Sometimes the annotation Done button said Cancel instead.

v5.70

New Feature: Annotation is now done through a single dialog.

New Feature: Annotations can be edited.

New Feature: Save Graph now saves all sheets with data and all annotation as a single "graph".

Enhancement: Annotation notes now understand super- and subscripts.

Change: The square root fit is now a "standard" model rather than an advanced one.

Change: Lock To Data now defaults to "on."

Enhancement: Teacher Notes have been extended into something that is almost a user manual.

Enhancement: Control-clicking the Swap x & y button swaps the axis labels too.

v5.63

Bug Fix: Annotation for an inverse fit did not work properly.

Bug Fix: Highlighting of the sheet selection buttons now works correctly.

v5.62

New Feature: Added a Swap x & y button, which does just what it says.

v5.61

Bug Fix: Adding extra data sheets broke graph saving and recalling.

v5.60

Enhancement: nPlot now supports 5 separate curves!

v5.52

Bug Fix: The width of the background box for annotation depended on what was in the Y Label field.

Bug Fix: Canceling an annotation arrow did not work properly.

v5.51

Bug Fix: Drawing arrows didn't work properly if you tried two arrows in a row.

Enhancement: Type of fit now included with fit parameters in annotation.

v5.50

New Feature: Annotation - Can position the fit results, notes, and arrows on the graph.

New Feature: Lock To Data option draws tangents only at the data points.

New Feature: The exponential fit has a baseline. Which it should have had before.

Aesthetic Tweak: Rounded corners on pop-ups. Because life is spiky enough.

v5.45

New Feature: Double-clicking in a cell enables the arrow keys for editing. Overall behavior is more spreadsheet-like.

v5.44

Bug Fix: Scaling for large/small numbers caused the fitting parameters to be reported incorrectly.

Aesthetic Tweak: Large or small fitting constants now displayed using scientific notation.

v5.43

New Feature: Plot title now understands subscripts.

v5.42

Bug Fix: Correct offset in y labels introduced in v5.40

Bug Fix: Correct axis scaling for cases where all data is negative.

v5.41

Bug Fix: Subscript feature broke superscripts for labels with no subscripts.

v5.40

New Feature: Subscripts in axis labels and units. Enclose your subscript like _{this}.

Aesthetic Tweak: Advanced model radio buttons now line up with the other model radio buttons.

Aesthetic Tweak: Save Name input field shortened so it stays on the same line as the text.

v5.31

Bug Fix: cells with two decimal points now parse properly.

Bug Fix: data with math operators can now be pasted.

v5.30

New Feature: cells now understand math operators.

Bug Fix: if the opimum max value for an axis was zero, axis scaling would fail.

v5.25

Enhancement: Improved wording of error message for pasted non-numeric characters.

Enhancement: CSS edits to improve formatting of text input fields.

v5.24

Bug Fix: m^2/s^2 will now display correctly as m2/s2 in the axes labels.

v5.23

New Feature: Brief confirmation dialog displayed when saving a curve.

v5.22

New Feature: Title and axis labeling now includes a degree symbol. Type "\deg".

v5.21

New Feature: RMSE is now calculated for the Exactly Proportional (non)fit.

Aesthetic Tweak: zero values in data grid no longer in scientific notation.

Really minor aesthetic fix: Save, Recall, and Download buttons don't move when you change sheets.

v5.20

New fits: y = Ax1/2 (under Advanced Models) and a "No Relation" fit

v5.10

New Feature: Scientific notation automatically used for large and small numbers.

Partial bug fix: no longer hangs when non-numeric data points are entered. But the point count will be off so some data points will not plot.

v5.08

Minor aesthetic improvement when a quadratic curve dips out of the plotting box

v5.07

Bug Fix: Program would hang if max and min on either axis were both zero

v5.06

Bug Fix: Bad CSS forced unnecessary scroll bars on 1366 x 768 (WXGA) displays

v5.05

Clear Data now also clears checked skip checkboxes

v5.04

Bug Fix: entering data only in the x column caused nPlot to hang

v5.03

Bug Fix: autoscaling failed for some data sets

v5.02

Front panel changed to make it clear that Saving a graph saves only the current sheet, not all three

Minor aesthetic improvements

v5.01

Bug Fix: version 5.00 broke superscripts in labels

v5.00

New Feature: support up to three separate curves, each with independent fit

v4.4

Internal variable handling finally cleaned up

v4.3

New Feature: add Advanced Models (power law and exponential)

v4.2

New Feature: add "skip" checkboxes to suppress data points

v4.1

New Feature: graph title option

New Feature: option to download fit parameters as a text file

v4.02

Bug Fix: previous version broke graph saving

v4.01

Labels at lower left corner are "flush" to prevent overlap

Minor aesthetic improvements to HTML

v4.0

Redesigned and renamed as nPlot

Obsolete fitting models removed

New Feature: TeX style Greek letter and superscripts in axis labels

Improved detection of "junk" inputs in data sheet

New Feature: report uncertainties in parameters and RMSE of fit