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.0.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.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gplotter-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 f3a9d1c0531af0923435281db0f6988ca019d1a49807b3b1a71d74b29a90d247
MD5 19f15a520886265843b8363f9c23e7c8
BLAKE2b-256 2fb8b64404cf850dcb1b2163a6eb105c545725a2aeeaa3ec68f7e2386058af0f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gplotter-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ac8d8d4baba4274056dbee1ee1035961f55ed9c20feebd029b727297a30a252
MD5 b00366fceaeabc5f9391234bf7328090
BLAKE2b-256 1c4856ba70caea0bc942eb99bbf0957bcabf7d489879cdf2767872c07d14c6bf

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