Skip to main content

CLI-based GNUPlot script generator

Project description

GNUPlot Script Generator

A powerful and flexible Python-based CLI tool to automatically generate GNUPlot scripts from your data files.

This tool supports multiple plot types, auto-detects headers, manages legends, and allows advanced customization like margins, axis labels, offsets, and export formats (PNG, EPS, PDF).


📦 Installation

pip install .

Make sure your gnuplot_gen module is installed in the active environment and accessible via CLI as gnuplot-gen.


🚀 CLI Usage

gnuplot-gen --input data.csv --plot_type line --output plot.gnu --title "Sample Plot"

Common Arguments

Argument Description
--input Input data file (CSV or TSV)
--output Output .gnu file
--plot_type Plot type: line, histogram, scatter
--title Plot title
--xlabel X-axis label
--ylabel Y-axis label
--legend Show legend (yes or no)
--font_size Font size (default: 14)
--width Width of the output plot in inches
--height Height of the output plot in inches
--output_format png, eps, pdf, or svg
--xrange_min / --xrange_max Limit the X-axis range
--yrange_min / --yrange_max Limit the Y-axis range
--y_x_diff Difference between ytics

🧠 Features

✅ Auto-detect headers and use as legends ✅ Supports line, histogram, scatter plots ✅ Multiple output formats: PNG, EPS, PDF, SVG ✅ Custom margins, offsets, label positions ✅ Clean and reusable GNUPlot scripts ✅ Easily extendable and modular


📄 Example

Input CSV (example.csv)

X,Y1,Y2
1,10,20
2,15,25
3,20,30

Command

gnuplot-gen --input example.csv --plot_type line --title "My Line Plot" --output plot.gnu

This generates a script plot.gnu that can be run using:

gnuplot plot.gnu

🛠 Development

To run locally:

git clone https://github.com/yourusername/gnuplot-gen.git
cd gnuplot-gen
pip install -e .
gnuplot-gen --help

🤝 Contributing

Feel free to fork the repo and submit pull requests. Suggestions and feature requests are welcome!


📄 License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gplotter-0.1.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gplotter-0.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file gplotter-0.1.1.tar.gz.

File metadata

  • Download URL: gplotter-0.1.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for gplotter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9c15ad0c92c9e37d8a764b28751c5c3d1aefd38f1ed09e89cd7884cafb4bd564
MD5 f896352781f9e27c4369a3d22ff51bdc
BLAKE2b-256 c38301c67e356a1af11505073a7a4f653353644dbc76a99ce1f89b02df254507

See more details on using hashes here.

File details

Details for the file gplotter-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gplotter-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for gplotter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d19b33781d3880949dc1c9310dfad5028f590c8df9a9ab724d67524bc6defdbe
MD5 67e5b61b948cff531dd6d3c97329cba9
BLAKE2b-256 5a0095ae4af9d74f82bf7e3a289e6452bf4215e1a64eda3f725d24127d054b06

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page