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.2.tar.gz (5.5 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.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gplotter-0.1.2.tar.gz
  • Upload date:
  • Size: 5.5 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.2.tar.gz
Algorithm Hash digest
SHA256 e66392ec981a4d079f1dbddfc7bd6c6c4d10e6e7c0336af2cdad1fdae8bbf1b9
MD5 047c61af061ed15c48d00ff9ba09ac9d
BLAKE2b-256 1d5ee9663f08826976dd07d19709a05e173ebd06d5696ebda5b19a7d3af0680a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gplotter-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1616e74d0e3b708f216047d18e3153d356bf7ec896bccd1a87d1e9734c9dc4bc
MD5 0c6d1bc32bc32442775b3687d2ded3cc
BLAKE2b-256 fa223978470576ad0b5713d020f7946fdd8c190a11524d2d6b660ceac53d24b5

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