{"id":18986197,"url":"https://github.com/simongravelle/pyplot-perso","last_synced_at":"2025-04-19T20:38:14.522Z","repository":{"id":214690782,"uuid":"737122279","full_name":"simongravelle/pyplot-perso","owner":"simongravelle","description":"Personal functions for making Pyplot Python figures","archived":false,"fork":false,"pushed_at":"2024-10-01T14:20:21.000Z","size":16516,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-29T13:06:28.897Z","etag":null,"topics":["curve","latex","personal","preference","pyplot","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simongravelle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-29T22:19:49.000Z","updated_at":"2025-03-26T13:24:51.000Z","dependencies_parsed_at":"2023-12-29T23:27:14.692Z","dependency_job_id":"340327e9-4d13-4569-956b-2229887f76dd","html_url":"https://github.com/simongravelle/pyplot-perso","commit_stats":null,"previous_names":["simongravelle/pyplot-perso"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongravelle%2Fpyplot-perso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongravelle%2Fpyplot-perso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongravelle%2Fpyplot-perso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongravelle%2Fpyplot-perso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simongravelle","download_url":"https://codeload.github.com/simongravelle/pyplot-perso/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249795193,"owners_count":21326776,"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":["curve","latex","personal","preference","pyplot","python"],"created_at":"2024-11-08T16:30:41.342Z","updated_at":"2025-04-19T20:38:14.482Z","avatar_url":"https://github.com/simongravelle.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/737122279.svg)](https://zenodo.org/doi/10.5281/zenodo.13341527)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n# Matplotlib Pyplot functions\n\nMy own Python class for making [Pyplot](https://matplotlib.org/3.5.3/api/_as_gen/matplotlib.pyplot.html)\nfigures compatible with Latex documents. These functions are used in my most recent publications, as well as in:\n- [LAMMPS tutorials](https://lammpstutorials.github.io)\n- [NMRforMD](https://nmrformd.readthedocs.io)\n\n## Examples\n\n### Simple bi-panel figure\n\n![illustration](examples/bi-panel.png#gh-light-mode-only)\n\n![illustration](examples/bi-panel-dm.png#gh-dark-mode-only)\n\nThe Python code to generate the figure:\n\n```python\n    # Initialise figure\n    myplt = PltTools()\n    myplt.prepare_figure(fig_size = (18,12), dark_mode = dark_mode,\n                         transparency = True, n_colone = 2)\n    # Panel 1\n    myplt.add_panel(panel_position = [0, 0])\n    myplt.add_plot(x = x1, y = y1/2, marker = \"o\", data_color = 2,\n                   markersize = 6, data_label = r\"$\\textrm{data}~\\alpha$\")\n    myplt.add_plot(x = x3, y = y3, marker = \"o\", data_color = 0, markersize = 10,\n                   data_label = r\"$\\textrm{data}~\\beta$\")\n    myplt.add_plot(x = x2, y = y2, marker = \"-\", data_color = \"autogray\",\n                   data_label = r\"$\\textrm{linear fit}$\")\n    myplt.complete_panel(xlabel = r\"$x ~ \\textrm{[\\AA{}]}$\", ylabel = r\"$t ~ \\textrm{[ps]}$\",\n                         panel_title = r\"$\\textrm{Time vs distance}$\", xpad = 10)\n    myplt.set_boundaries(y_boundaries = (0, 5))\n    # Panel 2\n    myplt.add_panel(type = 'loglog', panel_position = [0, 1])\n    myplt.add_plot(x = x4, y = y4, marker = \"o\", data_color = 0,\n                   markersize = 16)\n    myplt.add_plot(x = x5, y = y5, marker = \"p\", data_color = 0,\n                   markersize = 16)\n    myplt.add_plot(x = x6, y = y6, marker = \"^\", data_color = 0,\n                   markersize = 16)\n    myplt.complete_panel(xlabel = r\"$E ~ \\textrm{[J]}$\", ylabel = r\"$N_\\textrm{p} ~ [0]$\",\n                         panel_title = r\"$\\textrm{Population size vs energy}$\", xpad = 10)\n    myplt.set_boundaries(x_boundaries = (0.01, 1000), y_boundaries = (0.01, 1000))\n    # Finish figure\n    myplt.add_subplotlabels(type_label_panel = \"a\")\n    myplt.save_figure(filename = \"bi-panel\", saving_path = 'examples/', show = False)\n```\n\nSee also the [examples](examples/examplesmv.ipynb) notebook.\n\n## Light mode vs dark mode\n\n- For web integration, use either dark or light mode with a transparent background, as done for instance in [lammps tutorials](https://lammpstutorials.github.io).\n- For scientific publication, use the light mode without transparent background.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimongravelle%2Fpyplot-perso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimongravelle%2Fpyplot-perso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimongravelle%2Fpyplot-perso/lists"}