Plottle › GUI Guide

GUI Tutorial — Plottle

This guide walks through the Streamlit app page by page, then shows a complete end-to-end workflow: upload data → analyze → plot → export.


Launching the App

# Activate your virtual environment first, then:
streamlit run plottle/Home.py

Open http://localhost:8501 in your browser. The sidebar on the left lists all pages.


Page 1 — Data Upload

Purpose: Load one or more data files into the session. All subsequent pages work with the data loaded here.

Supported formats

Extension Returns
.csv, .xlsx, .tsv, .json, .parquet pandas DataFrame
.npy, .npz NumPy array
.pkl Any Python object

Steps

  1. Click Browse files (or drag-and-drop) to upload your file.
  2. The page shows a preview: shape, column types, and summary statistics.
  3. Upload additional files — each becomes a named dataset in the sidebar selector.
  4. Select the active dataset from the dropdown at the top of every page.

Tips


Page 2 — Quick Plot

Purpose: Generate any of the 13 supported plot types with point-and-click controls.

Plot types available

Category Types
Matplotlib (static) Line, Scatter, Histogram, Heatmap, Contour
Seaborn (statistical) Distribution, Box / Violin, Regression
Plotly (interactive) Histogram, Scatter, Line, Heatmap, 3D Surface

Steps

  1. Select a plot type from the dropdown.
  2. Choose your X column and Y column (or the data array for histograms).
  3. Adjust style options: title, axis labels, color palette, line width, etc.
  4. Click Generate Plot.
  5. Plotly charts are interactive — zoom, pan, and hover for values.
  6. Expand Export plot & data to download the figure as PNG, SVG, PDF, or HTML.

Tips


Page 3 — Analysis Tools

Purpose: Run quantitative analysis on the active dataset. Five tabs cover the most common scientific workflows.

Tab A — Descriptive Statistics

Displays mean, median, std, variance, min, max, Q1, Q3, IQR, and range for every numeric column. Also runs a Shapiro-Wilk normality test with pass/fail indicator.

Tab B — Distribution Fitting

Fit a theoretical distribution (Normal, Exponential, Log-normal, etc.) to a numeric column. Shows fitted parameters, KS-test statistic, and an overlay plot.

Tab C — Curve Fitting

Fit a model to X/Y data:

Model Parameters
Linear slope, intercept, R²
Polynomial degree 1–10, coefficients, R²
Exponential a, b (y = a·exp(b·x)), R²
Custom Enter any Python expression using x, e.g., a * np.sin(b * x) + c

Results show fitted parameters and a residuals plot. Click Copy Parameters to paste values into a script.

Tab D — Optimization

Find a function minimum or root:

Tab E — Linear Algebra

Upload or enter a matrix, then compute:


Page 4 — Multi-Plot Dashboard

Purpose: Display up to six independent plots side-by-side in a configurable grid.

Steps

  1. Choose a grid layout (1×1 up to 2×3).
  2. For each cell, select a dataset, plot type, and columns independently.
  3. Click Generate Dashboard — all plots render simultaneously.
  4. Expand any cell to enlarge it; click its Download button to save.

Tips


Page 5 — Advanced Plotting

Purpose: Specialized visualizations not available on the Quick Plot page.

Options

Feature Description
Correlation Heatmap Pearson correlation matrix for all numeric columns
Overlaid Distributions KDE / ECDF overlaid across groups (color-coded by a categorical column)
Grouped Categorical Box, violin, or strip plot grouped by a categorical column
3D Scatter Interactive Plotly 3D scatter with color mapping
HTML Export Save any Plotly figure as a self-contained HTML file

Page 6 — Settings

Purpose: Persist plot defaults and create named style presets.

Configurable defaults

Presets

Click Save as preset to name and store the current defaults. Switch between presets from the dropdown. Settings are written to config.json in the project root and persist across app restarts.


Page 7 — Export Results

Purpose: Download figures, datasets, and analysis results generated during the session.

Plot history

Every plot generated on Page 2 or Page 5 is recorded in the session history. For each:

Dataset export

Export the currently loaded dataset as CSV, JSON, NumPy (.npy), or pickle (.pkl).

Analysis results

Export any curve-fit or statistics result from Page 3 as a structured JSON file.

Session save / load


Complete Workflow Example

Goal: Upload a calibration dataset, fit a Beer-Lambert curve, export the fit result.

  1. Page 1: Upload calibration.csv (columns: concentration, absorbance).
  2. Page 3 → Curve Fitting: Select concentration (X) and absorbance (Y); choose Linear; click Fit. Note the slope (molar absorptivity · path length) and R².
  3. Page 2: Select Scatter plot; X = concentration, Y = absorbance; title = "Beer-Lambert Calibration"; click Generate Plot.
  4. Page 7: Download the scatter plot as PNG 300 dpi. Download the curve-fit result as JSON.

Total time: under two minutes with no code written.