Web-based interactive spectra and CSV plotter built with Flask and Plotly.js, served via Apache2 with mod_wsgi.
- Upload files via button or drag-and-drop
- Interactive charts with zoom, pan, and hover tooltips (Plotly.js)
- Multi-trace overlay — select different Y columns to compare signals
- Manual or autoscaled Y-axis range
- Supported file formats:
- Spectra files (with
BLOCKSIZEheader marker) - Semicolon-separated CSV (13-row header)
- Comma-separated CSV
- Tab-separated files
- Spectra files (with
cd webplot
python3 -m venv venv
venv/bin/pip install flask pandas numpy
venv/bin/python app.pyRun the setup script as root:
sudo bash setup.shThis will:
- Install
libapache2-mod-wsgi-py3 - Copy files to
/var/www/webplot/ - Create a Python virtual environment with dependencies
- Configure and enable the Apache virtual host
- Restart Apache
The app will be available at http://localhost/
webplot/
├── app.py # Flask backend (file parsing + routes)
├── wsgi.py # WSGI entry point for Apache
├── setup.sh # Automated deployment script
├── webplot.conf # Apache virtual host config
├── templates/
│ └── index.html # Single-page UI
└── static/
├── css/style.css # Styling
└── js/app.js # Client-side plotting logic
- Open the app in a browser
- Click Open or drag a file onto the chart area
- Select X and Y columns from the dropdowns
- Check Add plot to overlay multiple traces
- Uncheck Autoscale and set Y min/max for manual range, then click Plot
- Click Clear to remove all traces