LabDataPlot
A flexible Python library for reading and plotting data from laboratory measurement equipment
LabDataPlot simplifies the process of loading, analyzing, and visualizing data exported from laboratory instruments. Stop wrestling with different file formats and focus on your data.
Features
- Automatic format detection - Just pass the file, the library figures out the format
- Multiple equipment support - 10+ instruments from major manufacturers
- Simple plotting API - Clean wrapper around matplotlib for quick visualizations
- Direct data access - Full pandas DataFrame access for custom analysis
- Time-aware - Automatic detection and parsing of timestamp columns
- Metadata extraction - Access acquisition date, channel info, units, and more
Supported Equipment
Data Acquisition / Dataloggers
| Equipment | Parser Name | File Type |
|---|---|---|
| Keysight 34970A/34972A | keysight |
Excel (.xlsx) |
| Dewesoft Datalogger | dewesoft |
Excel (.xlsx) |
| Fluke Hydra 2680/2686 | fluke |
CSV, Excel |
| Hioki LR8400/LR8401/MR8875 | hioki |
CSV, Excel |
Oscilloscopes
| Equipment | Parser Name | File Type |
|---|---|---|
| Tektronix TDS/MSO/DPO/MDO | tektronix |
CSV |
| Rigol DS/MSO series | rigol |
CSV |
| Yokogawa DL/SL series | yokogawa |
CSV, Excel |
Power Analyzers & Source Meters
| Equipment | Parser Name | File Type |
|---|---|---|
| Yokogawa WT series | yokogawa |
CSV, Excel |
| Keithley 2400/2450 SourceMeter | keithley |
CSV, Excel |
| Keithley DMM6500/DAQ6510 | keithley |
CSV, Excel |
Generic
| Format | Parser Name | Description |
|---|---|---|
| CSV | csv |
Generic CSV with auto-detection |
Installation
pip install labdataplot
Requirements
- Python 3.10+
- pandas >= 2.0.0
- matplotlib >= 3.7.0
- openpyxl >= 3.1.0
Quick Start
Basic Usage
from labdataplot import DataLoader, Plotter
# Load data (format auto-detected)
loader = DataLoader('measurement.xlsx')
# View file information
print(loader.info)
# DataInfo(
# equipment='Keysight 34970A',
# channels=60,
# time_column='Time',
# acquisition_date='2025-11-25 17:37:50'
# )
# Create plots
plotter = Plotter(loader)
plotter.plot(['101 (VDC)', '102 (VDC)', '103 (VDC)'])
plotter.show()
Loading Data
from labdataplot import DataLoader, list_parsers
# See all available parsers
print(list_parsers())
# ['dewesoft', 'keysight', 'fluke', 'hioki', 'tektronix', 'rigol', 'yokogawa', 'keithley', 'csv']
# Auto-detect format
loader = DataLoader('data.xlsx')
# Or specify format explicitly
loader = DataLoader('data.csv', format='tektronix')
# Access data
df = loader.data # Full pandas DataFrame
time = loader.time # Time column (if available)
cols = loader.columns # List of data columns
channel = loader['CH1'] # Direct column access
# Find channels by pattern
voltage_channels = loader.get_channel(r'VDC') # All channels with "VDC"
Plotting
from labdataplot import DataLoader, Plotter
loader = DataLoader('oscilloscope_capture.csv')
plotter = Plotter(loader)
# Single channel
plotter.plot('CH1', title='Channel 1', ylabel='Voltage (V)')
# Multiple channels
plotter.plot(['CH1', 'CH2', 'CH3', 'CH4'])
# Subplots - one per channel
plotter.subplots(['CH1', 'CH2', 'CH3', 'CH4'], rows=2, cols=2)
# Quick view of first N channels
plotter.quick(10)
# Heatmap visualization
plotter.heatmap(title='All Channels Overview')
# Save figure
plotter.save('output.png', dpi=300)
plotter.show()
Comparing Multiple Files
loader1 = DataLoader('before_test.csv')
loader2 = DataLoader('after_test.csv')
plotter = Plotter(loader1)
plotter.compare(
loader2,
column='CH1',
labels=['Before', 'After'],
title='Test Comparison'
)
plotter.show()
Examples
Simple Line Plot
plotter.plot(
['CH1', 'CH2'],
title='Oscilloscope Capture',
ylabel='Voltage (V)',
xlabel='Time (s)'
)
Subplots
plotter.subplots(
['101 (VDC)', '201 (VDC)', '301 (VDC)'],
rows=3,
title='One Channel per Slot'
)
Heatmap
plotter.heatmap(
columns=loader.columns[:15],
title='First 15 Channels'
)
Adding Support for New Equipment
LabDataPlot is designed to be easily extensible. To add support for new equipment:
- Create a new parser in
labdataplot/parsers/ - Inherit from
BaseParser - Implement
detect()andparse()methods - Register in
parsers/__init__.py
from labdataplot.parsers.base import BaseParser, DataInfo
import pandas as pd
class MyEquipmentParser(BaseParser):
name = "my_equipment"
description = "Parser for My Equipment"
def detect(self, filepath: str) -> bool:
# Return True if file matches this format
...
def parse(self, filepath: str) -> tuple[pd.DataFrame, DataInfo]:
# Read and return (DataFrame, DataInfo)
...
See the documentation for detailed instructions.
API Reference
DataLoader
| Property/Method | Description |
|---|---|
data |
Returns pandas DataFrame with all data |
info |
Returns DataInfo with metadata |
columns |
List of data column names |
time |
Time column as Series (if available) |
head(n) |
First n rows |
describe() |
Statistical summary |
get_channel(pattern) |
Find columns matching regex pattern |
Plotter
| Method | Description |
|---|---|
plot(columns, ...) |
Line plot of one or more columns |
subplots(columns, rows, cols, ...) |
Multiple subplots |
compare(*loaders, column, ...) |
Compare same column across files |
heatmap(columns, ...) |
Heatmap visualization |
quick(n) |
Quick view of first n columns |
save(filename, dpi) |
Save current figure |
show() |
Display all plots |
Documentation
Full documentation is available in the docs folder:
Contributing
Contributions are welcome! Whether it's:
- Adding support for new equipment
- Bug fixes
- Documentation improvements
- Feature requests
Please feel free to open an issue or submit a pull request.
Development Setup
# Clone the repository
git clone https://github.com/lgili/LabDataPlot.git
cd LabDataPlot
# Install in development mode with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black labdataplot
ruff check labdataplot
Roadmap
- Keysight 34970A datalogger support
- Dewesoft datalogger support
- Tektronix oscilloscope support
- Rigol oscilloscope support
- Yokogawa instruments support
- Keithley SourceMeter support
- Fluke datalogger support
- Hioki datalogger support
- Generic CSV support
- Interactive plots with Plotly
- Data export functionality
- Report generation
- CLI interface
- NI DAQ support
- LeCroy oscilloscope support
- Rohde & Schwarz support
License
MIT License - see LICENSE file for details.
Acknowledgments
- Built with pandas and matplotlib
- Inspired by the need to quickly visualize test data from various lab equipment
Metadata
Release files for labdataplot 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| labdataplot-0.2.1.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| labdataplot-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / labdataplot-0.2.1.tar.gz
| Download URL | labdataplot-0.2.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
358c43aef8d884a92cae9977b9344f6aa6f5fcc19d963aaa915c995c9723508b
|
|
BLAKE2b-256 checksum How to use checksums |
56d7cc2ac87d24456c9971fe13951e97598b5bd08fafdd70a0b2ef203ee711c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2025.
Transparency logRelease files / labdataplot-0.2.1-py3-none-any.whl
| Download URL | labdataplot-0.2.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb5afc8d82be493f1a6597bfe9a2adc49172e2cfd86855fbe1f1ea8cb7fa99e0
|
|
BLAKE2b-256 checksum How to use checksums |
b7bf60f781bc9addcc7054fd51d9cd65fb66513fcd944dc453bf54d11d5b4c48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2025.
Transparency log