User Manual
Introduction
This application is developed with pre-university physics students in mind. It provides a simple tool for plotting graphs with error bars and determining the best fit line for their data. It is particularly designed for students with minimal experience using spreadsheet software such as Microsoft Excel or Google Sheets.
While this app serves as a helpful introduction, it is neither a substitute for sophisticated spreadsheet software nor a replacement for professional data analysis tools. Students are strongly encouraged to learn and master basic spreadsheet skills. Additionally, they are invited to explore advanced software, such as OriginPro for professional use or free alternatives like LabPlot, to further enhance their data analysis capabilities.
Features
This app allows you to input data, visualize it through interactive graphs, and perform various curve fitting analyses to model your data.
-
Data Input
- Enter your data points manually in the table.
- Datasets: Create and manage multiple datasets using the
+tab. You can rename a dataset tab (double-click on desktop, long-press on touch/pen). Each dataset retains its own data, uncertainty settings, and fitting results. - Add Row: Click the "Add Row" button to add an individual data row.
- Clear Data: Remove all data from the active dataset. A confirmation dialog appears when the dataset already contains data. You can tick "Don't ask again" to skip the confirmation in future.
- Clone x: Use the "Clone x" button to create a new dataset and copy all x-values from the current dataset into it. This feature simplifies workflows when comparing multiple datasets.
-
Data Processing
- Open the Data Processing popup to create transformed columns from the active dataset.
- Use formulas with
x,y, and valid header identifiers (for example=1/x,x^2,log(y)). - Map processed output to a target dataset and copy only valid rows.
-
Data Import/Export
- Import data from a
.csvfile. - Export your data to
.csvformat. - View Table: Opens a popup showing a formatted table preview with rendered LaTeX.
Hover (desktop) or tap (touch devices) the table to open copy actions:
Copy imageorCopy raw Markdown.
- Import data from a
-
Curve Fitting
- Perform basic fits such as Linear, Quadratic, Cubic, Exponential, and Power.
- Access advanced fitting models such as Sinusoidal and Gaussian.
- Use Custom Fit with math.js syntax for user-defined equations.
- Custom Fit auto-detects up to 5 parameters and auto-fills initial guesses from data.
- Adjust and reset initial parameters for advanced fitting methods.
- View fitting equations and R² values.
- Copy fitted equations: In the Fitting Result panel, hover (desktop) or tap (touch
devices) the fitted equation to open copy actions:
Copy imageorCopy raw LaTeX(wrapped in$...$) for reports, notes, and further analysis. - Each dataset maintains its own fitting result until a new fit is performed.
- Model equations:
- Linear: $y = mx + c$
- Quadratic/Cubic: $y = a_n x^n + a_{n-1} x^{n-1} + \ldots + a_0$
- Exponential: $y = A e^{b(x - x_0)} + c$
- Power: $y = A(x - x_0)^b + c$
- Sinusoidal: $y = A e^{bx} \sin(kx - \phi) + c$
- Gaussian: $y = A e^{-\frac{(x - \mu)^2}{2\sigma^2}} + c$
- Custom: $y = f(x,\theta)$ where $\theta$ are auto-detected parameters (max 5)
-
Graph Visualization
- Interactive plots powered by Plotly.js.
- Toolbar controls: Pan, Zoom, Zoom In, Zoom Out, Auto-scale, Reset axes, and Download plot.
- Auto-scale vs Reset axes: Auto-scale fits both axes to the visible data values. Reset axes restores Plotly's default reset behavior for the current plot.
- Customize the graph title and axis labels.
- LaTeX Mode: A toggle allows you to activate or deactivate LaTeX rendering for all headings, labels, and titles.
- Plot All Datasets: Visualize all datasets simultaneously in a combined plot popup.
-
Theme Toggle
- Switch between light and dark themes using the theme toggle button in the banner.
- Your theme preference is saved and persists across sessions.
-
Auto-Save
- Your data, settings, and fitted curves are automatically saved to your browser's local storage.
- When you return to the app, your previous session is restored automatically.
Getting Started
1. Entering Data
- Adding Data Points: Click the "Add Row" button to add a new data row. Enter your
xandyvalues in the respective input fields. - Removing Data Points: Click the "Clear Data" button to remove all data in the active dataset. A confirmation dialog appears only when the dataset is not empty.
- Cloning x-values: In the active dataset view, click the "Clone x" button to create a new dataset and copy the current dataset's x-values into it.
- Adding a New Dataset: Click the
+tab ("Add a new dataset") to create a new dataset. Each dataset is stored independently and maintains its own header values, uncertainty settings, and fitting results. - Renaming a Dataset: Double-click a dataset tab label on desktop, or long-press it on touch/pen devices.
- Removing a Dataset: Click the × button on a dataset tab to remove that dataset. A confirmation is shown when the dataset is not empty. You must keep at least one dataset.
- Keyboard Navigation: Use the arrow keys to navigate between cells in the data table. Press Enter to move to the cell below.
2. Managing Uncertainties
- Toggling Uncertainties: Check the Δx or Δy checkboxes to enable uncertainties for the respective axis.
- Selecting Uncertainty Type: Choose between absolute or percentage uncertainties from the dropdown menus.
- Entering Uncertainties: Enter the uncertainty values in the input fields that appear once uncertainties are enabled.
- Applying Global Uncertainties: Enter a value in the "Enter Δx" or "Enter Δy" fields and click the corresponding "Apply Δx" or "Apply Δy" button to apply the uncertainty across all data points.
3. Importing and Exporting Data
- Importing from CSV: Click the "Import .csv" button and select a CSV file from your device.
If the active dataset already has data, a confirmation dialog appears before import. Ensure that the CSV file
has at least two columns for
xandy. Additional columns can represent uncertainties. - Export .csv: Click the "Export .csv" button to download your data in CSV format.
-
View Table: Click the "View Table" button to open a popup with your data displayed as a
formatted table.
- LaTeX expressions in headers and values are rendered as proper mathematical notation.
- Copy Actions: Hover (desktop) or tap (touch devices) the table to open Copy image and Copy raw Markdown.
- Copy image: Copies the rendered table as an image for pasting into Word, Google Docs, or slides.
- Copy raw Markdown: Copies the raw Markdown table source, suitable for documentation or use in the Markdown Editor.
Note: Uncertainties (absolute or percentage) play a crucial role in determining how data is
formatted in exported .csv output and copied raw Markdown tables.
1. Absolute Uncertainties: The number of decimal places in the exported values matches the
precision of the absolute uncertainty. For example, if the uncertainty is ±0.05, the corresponding
data value will be exported with two decimal places (e.g., 5.25 ± 0.05).
2. Percentage Uncertainties: The precision of exported values is determined using a logarithmic formula that scales smoothly with the uncertainty magnitude:
- ~100% uncertainty: 1 significant figure
- ~10% uncertainty: 2 significant figures
- ~1% uncertainty: 3 significant figures
- ~0.1% uncertainty: 4 significant figures
This approach ensures that each order of magnitude improvement in precision adds one meaningful digit to the reported value.
4. Data Processing
- Open Data Processing: Click the "Data Processing" button in the Data section (marked with an arrow to indicate it opens a popup).
- Source scope: The popup reads valid rows from the active dataset where both
xandyare finite numbers. The source section title shows the active dataset name. - Source table: The source table is scrollable and shows roughly seven rows at a time.
- Create processed columns: Use
Process xorProcess y, then enter a math.js expression such as=1/x,1/V,x^2,log(y), orsqrt(abs(y)). - Process button labels: Buttons show axis-first labels (for example
Process x (time)) when custom headers are used, to reduce ambiguity. - Apply/Cancel flow: Pressing Process first adds a pending column preview. Click Apply (or press Enter in the formula box) to compute and keep it. Click Cancel to remove the pending column.
- Variables:
x,y, and valid header identifiers are available in formulas. - Formula validation: Formula warnings/errors (for example unknown variables) appear inside the formula panel.
- Map output: Choose New x column and New y column from source or processed columns, choose a Target dataset, then click Copy to Dataset. The popup closes automatically and navigates to the target dataset.
- Row filtering: Any row producing invalid/non-finite mapped values is skipped during copy.
- Limitations (MVP): Uncertainties are not included in this processing step. Copied target data
writes only
x,yand resets target uncertainty settings and stored fit artifacts.
5. Performing Curve Fitting
-
Basic Fit:
- Navigate to the "Basic" tab.
- Select a fitting method (Linear, Quadratic, Cubic, Exponential, Power) from the dropdown.
- Click the "Fit Curve" button to perform the fitting.
- The fitting equation and R² value will be displayed below the graph for the active dataset.
- Hover the fitted equation (desktop) or tap it (touch devices) to open copy options. Use
Copy image to paste a visual equation, or Copy raw LaTeX to copy
$...$for reuse in LaTeX-based tools. - Click the "Clear Fit" button to remove the fitted curve.
-
Advanced Fit:
- Navigate to the "Advanced" tab.
- Select an advanced fitting method (Sinusoidal, Gaussian) from the dropdown.
- Some initial parameters are calculated based on the imported dataset. Adjust the initial parameters if needed, or use Reset parameters.
- Click the "Fit Curve" button to perform the fitting.
- The fitting equation and R² value will be displayed below the graph for the active dataset.
- You can copy the displayed fitted equation using the same equation menu (Copy image / Copy raw LaTeX).
- Click the "Clear Fit" button to remove the fitted curve.
-
Custom Fit:
- Navigate to the "Custom" tab.
- Enter a custom equation for
yusing math.js syntax (for example:A*exp(-k*x)+cora*x^2+b*x+d). - Use the Help button for quick math syntax reference.
- Parameters are detected automatically from symbols that are not
x, math constants, or math functions. - Up to 5 parameters are supported for Custom Fit.
- Initial parameter values are auto-filled from the dataset. You can edit them manually or click Reset parameter to regenerate guesses.
- Click the "Fit Curve" button to perform the fit.
- The fitted equation and R² value are shown in the Fitting Result panel and support Copy image / Copy raw LaTeX.
- Click the "Clear Fit" button to remove the fitted curve.
6. Visualizing All Datasets
-
Plot All Datasets: Click the "Plot All Datasets" button to open a popup displaying a combined
plot of all datasets.
- All datasets are plotted together.
- Each dataset's fitted curve is drawn in a different color.
- The popup displays input boxes for the graph title and axis labels. By default, these values are taken from the active dataset but can be edited.
- Changes to the title or labels update the combined plot accordingly.
7. LaTeX Mode
-
LaTeX Toggle: A LaTeX mode toggle is located at the top of the app.
- Default Behavior: When LaTeX mode is off (the default), all headings, axis labels, and titles are displayed as plain text.
- Activating LaTeX Mode: Toggle the switch to on to have your text rendered using LaTeX formatting (e.g., for complex mathematical expressions). This makes your graphs and labels appear more professional.
- This setting affects the entire app, including the combined plot view.
8. Theme Toggle
-
Light/Dark Mode: Click the theme toggle button (sun/moon icon) in the top-right corner of the
banner to switch between light and dark themes.
- The dark theme is optimized for low-light environments and reduces eye strain.
- Your theme preference is automatically saved and will persist across browser sessions.
- Graphs and plots automatically adjust their colors to match the selected theme.
Tips and Best Practices
- Data Quality: Ensure that your data points are accurate and representative of the phenomenon you are modeling.
- Choosing Initial Parameters: For advanced fitting methods, selecting appropriate initial parameters can significantly impact the convergence and accuracy of the fit. For Custom Fit, start from the auto-filled values and adjust them if convergence is poor.
- Uncertainties: Use uncertainties to account for measurement errors or variability in your data. Choose between absolute and percentage uncertainties based on your data's nature.
- LaTeX Formatting: Enable LaTeX mode when you need high-quality mathematical expressions. Otherwise, keep it off for improved performance.
- Auto-Save: Your work is automatically saved to your browser's local storage. You can safely close the browser and return later to continue where you left off.
- Keyboard Shortcuts: Use arrow keys to quickly navigate between cells in the data table, and press Enter to move down to the next row.
Troubleshooting
- Fitting Did Not Converge: If a fitting method fails to converge, try adjusting the initial parameters or selecting a different fitting model.
- Custom Fit Formula Errors: Verify math.js syntax, keep multiplication explicit (for example
2*x), and ensure the equation uses onlyxplus parameter symbols on the right-hand side. - Custom Fit Parameter Limit: If more than 5 parameters are detected, simplify the equation before fitting.
- Import Errors: Ensure that your CSV file is properly formatted with headers and consistent columns.
- LaTeX Rendering Issues: Verify that your LaTeX syntax is correct. If you experience delays, consider leaving LaTeX mode off.
-
Combined Plot Issues:
- If the combined plot title or axis labels do not match the active dataset, ensure that you switch datasets and that the combined plot controls are updated accordingly.
- If fitted curves or error bars do not appear as expected, double-check that each dataset's fitting and uncertainty settings are stored and restored properly.
Happy plotting!