{"id":25052157,"url":"https://github.com/stefan-wr/gnuplot-multiplot-gen","last_synced_at":"2025-06-24T21:38:24.079Z","repository":{"id":44361800,"uuid":"136591218","full_name":"stefan-wr/gnuplot-multiplot-gen","owner":"stefan-wr","description":"📊 A gnuplot template-script generator for easy multiplot setup written in Python.","archived":false,"fork":false,"pushed_at":"2019-01-08T09:20:01.000Z","size":80,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T08:58:31.011Z","etag":null,"topics":["gnuplot","plotting"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefan-wr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-08T08:37:13.000Z","updated_at":"2023-01-27T20:30:23.000Z","dependencies_parsed_at":"2022-09-23T00:51:07.405Z","dependency_job_id":null,"html_url":"https://github.com/stefan-wr/gnuplot-multiplot-gen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-wr%2Fgnuplot-multiplot-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-wr%2Fgnuplot-multiplot-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-wr%2Fgnuplot-multiplot-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-wr%2Fgnuplot-multiplot-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefan-wr","download_url":"https://codeload.github.com/stefan-wr/gnuplot-multiplot-gen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-wr%2Fgnuplot-multiplot-gen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259181819,"owners_count":22818015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gnuplot","plotting"],"created_at":"2025-02-06T10:28:27.572Z","updated_at":"2025-06-11T01:36:33.750Z","avatar_url":"https://github.com/stefan-wr.png","language":"Python","readme":"# gnuplot-multiplot-gen\nA Gnuplot template-script generator for easy multiplot setup written in Python.\n\nThis template generator was written to easily setup Gnuplot multiplots with non-standard paddings and margins between the plots, e.g. for **placing graphs right next to each other** when they share their X- and Y-axes.\n\nThis can be implemented in Gnuplot by manually setting individual margins `tmargin`, `bmargin`, `lmargin` and `rmargin` for each graph of the multiplot canvas as explained [here](http://www.gnuplotting.org/multiplot-placing-graphs-next-to-each-other/).\n\n## Usage\nRun the script like any other Python script on your system. The generated script is send to `stdout`.\n\n### Configuration\nConfiguring the generated multiplot template is done via the following variables in the script.\n\n```python\n# ---------- Configuration ----------\n# Number of lines and columns (number of plots in X and Y direction)\nlines = 2\ncols = 3\n\n# Paddings of all four sides\npad_top = 0.1\npad_bot = 0.1\npad_left = 0.1\npad_right = 0.1\n\n# Margins between the plots\nplot_x_margin = 0.01\nplot_y_margin = 0.01\n```\nThe variables `lines` and `cols` define the dimensions of the generated multiplot-matrix, where `lines * cols` equals the total number of graphs in the plot.\n\nThe other variables are paddings and margins. See the image below to understand what they do.\n\nThese variables are given in relative units, e.g. `pad_left = 0.1` will reserve 10% of the total width of the canvas on the left side for Y-Labels.\n\nThe variables `plot_x_margin` and `plot_y_margin` can be set to 0. In this case, their will be no margins between the graphs and their axes will touch.\n\nBy default only the X- and Y-labels of the lowermost and leftmost graphs are shown.\n\n![Variables](https://raw.githubusercontent.com/stefan-wr/gnuplot-multiplot-gen/master/variables.png)\n\nThere are two more additional variables:\n  - `plot_command` should be a string. This will be placed as a placeholder plot-command in the generated template.\n  - `plot_add` should also be string. If it is not empty, it will be placed in front of each plot-command.\n\n## Examples\n### Example with margins\n\u003cdetails\u003e\n\u003csummary\u003eGenerator configuration\u003c/summary\u003e\n\u003cpre\u003e\n# ---------- Configuration ----------\n# Number of lines and columns (number of plots in X and Y direction)\nlines = 2\ncols = 3\u003cbr\u003e\n\n\\# Paddings of all four sides\npad_top = 0.1\npad_bot = 0.1\npad_left = 0.1\npad_right = 0.1\n\n\n\\# Margins between the plots\nplot_x_margin = 0.01\nplot_y_margin = 0.01\n\u003c/pre\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGenerated template script\u003c/summary\u003e\n\u003cpre\u003e\nY1MARGIN = \"set tmargin at screen 0.900000; set bmargin at screen 0.505000\"\nY2MARGIN = \"set tmargin at screen 0.495000; set bmargin at screen 0.100000\"\nX1MARGIN = \"set lmargin at screen 0.100000; set rmargin at screen 0.360000\"\nX2MARGIN = \"set lmargin at screen 0.370000; set rmargin at screen 0.630000\"\nX3MARGIN = \"set lmargin at screen 0.640000; set rmargin at screen 0.900000\"\u003cbr\u003e\n\nNOXTICS = \"set format x ''; unset xlabel\"\nNOYTICS = \"set format y ''; unset ylabel\"\nXTICS = \"set format x '%g'; set xlabel 'X'\"\nYTICS = \"set format y '%g'; set ylabel 'Y'\"\n\nset multiplot layout 2,3\n\n@Y1MARGIN; @X1MARGIN; @NOXTICS; @YTICS;\nplot 1\n\n@Y1MARGIN; @X2MARGIN; @NOXTICS; @NOYTICS;\nplot 1\n\n@Y1MARGIN; @X3MARGIN; @NOXTICS; @NOYTICS;\nplot 1\n\n@Y2MARGIN; @X1MARGIN; @XTICS; @YTICS;\nplot 1\n\n@Y2MARGIN; @X2MARGIN; @XTICS; @NOYTICS;\nplot 1\n\n@Y2MARGIN; @X3MARGIN; @XTICS; @NOYTICS;\nplot 1\n\nunset multiplot\n\u003c/pre\u003e\n\u003c/details\u003e\n\n![Example 1](https://raw.githubusercontent.com/stefan-wr/gnuplot-multiplot-gen/master/screenshots/example1.PNG)\n\n\n### Example without margins\n\u003cdetails\u003e\n\u003csummary\u003eGenerator configuration\u003c/summary\u003e\n\u003cpre\u003e\n# ---------- Configuration ----------\n# Number of lines and columns (number of plots in X and Y direction)\nlines = 2\ncols = 3\u003cbr\u003e\n\n\\# Paddings of all four sides\npad_top = 0.1\npad_bot = 0.1\npad_left = 0.1\npad_right = 0.1\n\n\n\\# Margins between the plots\nplot_x_margin = 0.0\nplot_y_margin = 0.0\n\u003c/pre\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGenerated template script\u003c/summary\u003e\n\u003cpre\u003e\nY1MARGIN = \"set tmargin at screen 0.900000; set bmargin at screen 0.500000\"\nY2MARGIN = \"set tmargin at screen 0.500000; set bmargin at screen 0.100000\"\nX1MARGIN = \"set lmargin at screen 0.100000; set rmargin at screen 0.366667\"\nX2MARGIN = \"set lmargin at screen 0.366667; set rmargin at screen 0.633333\"\nX3MARGIN = \"set lmargin at screen 0.633333; set rmargin at screen 0.900000\"\u003cbr\u003e\n\nNOXTICS = \"set format x ''; unset xlabel\"\nNOYTICS = \"set format y ''; unset ylabel\"\nXTICS = \"set format x '%g'; set xlabel 'X'\"\nYTICS = \"set format y '%g'; set ylabel 'Y'\"\n\nset multiplot layout 2,3\n\n@Y1MARGIN; @X1MARGIN; @NOXTICS; @YTICS;\nplot 1\n\n@Y1MARGIN; @X2MARGIN; @NOXTICS; @NOYTICS;\nplot 1\n\n@Y1MARGIN; @X3MARGIN; @NOXTICS; @NOYTICS;\nplot 1\n\n@Y2MARGIN; @X1MARGIN; @XTICS; @YTICS;\nplot 1\n\n@Y2MARGIN; @X2MARGIN; @XTICS; @NOYTICS;\nplot 1\n\n@Y2MARGIN; @X3MARGIN; @XTICS; @NOYTICS;\nplot 1\n\nunset multiplot\n\u003c/pre\u003e\n\u003c/details\u003e\n\n![Example 2](https://raw.githubusercontent.com/stefan-wr/gnuplot-multiplot-gen/master/screenshots/example2.PNG)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-wr%2Fgnuplot-multiplot-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefan-wr%2Fgnuplot-multiplot-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-wr%2Fgnuplot-multiplot-gen/lists"}