{"id":18847711,"url":"https://github.com/jacobwilliams/pyplot-fortran","last_synced_at":"2026-01-25T13:03:38.386Z","repository":{"id":30617726,"uuid":"34173104","full_name":"jacobwilliams/pyplot-fortran","owner":"jacobwilliams","description":"For generating plots from Fortran using Python's matplotlib.pyplot 📈","archived":false,"fork":false,"pushed_at":"2024-08-17T14:04:58.000Z","size":2276,"stargazers_count":208,"open_issues_count":3,"forks_count":52,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-23T00:33:13.991Z","etag":null,"topics":["contour-plot","fortran","fortran-package-manager","matplotlib","plot","plotting","plotting-in-fortran","pyplot"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacobwilliams.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":"2015-04-18T16:23:29.000Z","updated_at":"2025-05-13T18:53:43.000Z","dependencies_parsed_at":"2023-01-14T17:20:00.206Z","dependency_job_id":"5465f182-1853-4274-9861-e4e3d17c9b7a","html_url":"https://github.com/jacobwilliams/pyplot-fortran","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/jacobwilliams/pyplot-fortran","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobwilliams%2Fpyplot-fortran","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobwilliams%2Fpyplot-fortran/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobwilliams%2Fpyplot-fortran/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobwilliams%2Fpyplot-fortran/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacobwilliams","download_url":"https://codeload.github.com/jacobwilliams/pyplot-fortran/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobwilliams%2Fpyplot-fortran/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28753411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["contour-plot","fortran","fortran-package-manager","matplotlib","plot","plotting","plotting-in-fortran","pyplot"],"created_at":"2024-11-08T03:09:19.874Z","updated_at":"2026-01-25T13:03:38.370Z","avatar_url":"https://github.com/jacobwilliams.png","language":"Fortran","readme":"![Pyplot-Fortran](media/logo.png)\n============\n\nA simple module for generating plots from Fortran using Python's matplotlib.pyplot.\n\n### Status\n\n[![GitHub release](https://img.shields.io/github/release/jacobwilliams/pyplot-fortran.svg?style=plastic)](https://github.com/jacobwilliams/pyplot-fortran/releases/latest)\n![Build Status](https://github.com/jacobwilliams/pyplot-fortran/actions/workflows/CI.yml/badge.svg)\n[![codecov](https://codecov.io/gh/jacobwilliams/pyplot-fortran/branch/master/graph/badge.svg?token=BHtd51oUTE)](https://codecov.io/gh/jacobwilliams/pyplot-fortran)\n\n### Overview\n\nCurrently, this module can be used to generate simple plots from Fortran.  Eventually, it may be expanded to provide additional features and other types of plots.\n\nThe way it works is simply to generate a Python script with the plotting code, which\nis then executed from the command line using the Fortran ```execute_command_line``` function.\n\n### Compiling\n\nThe module requires a modern Fortran compiler (it uses various Fortran 2003/2008 features such as deferred-length strings). It should work fine with the latest gfortran or ifort compilers.\n\nA `fpm.toml` file is provided for compiling pyplot-fortran with the [Fortran Package Manager](https://github.com/fortran-lang/fpm). For example, to build:\n\n```\nfpm build --profile release\n```\n\nBy default, the library is built with double precision (`real64`) real values. Explicitly specifying the real kind can be done using the following processor flags:\n\nPreprocessor flag | Kind  | Number of bytes\n----------------- | ----- | ---------------\n`REAL32`  | `real(kind=real32)`  | 4\n`REAL64`  | `real(kind=real64)`  | 8\n`REAL128` | `real(kind=real128)` | 16\n\nFor example, to build a single precision version of the library, use:\n\n```\nfpm build --profile release --flag \"-DREAL32\"\n```\n\nTo run the unit tests:\n\n```\nfpm test\n```\n\nTo use `pyplot-fortran` within your fpm project, add the following to your `fpm.toml` file:\n```toml\n[dependencies]\npyplot-fortran = { git=\"https://github.com/jacobwilliams/pyplot-fortran.git\" }\n```\n\nor, to use a specific version:\n```toml\n[dependencies]\npyplot-fortran = { git=\"https://github.com/jacobwilliams/pyplot-fortran.git\", tag = \"3.3.0\" }\n```\n\nTo generate the documentation using [ford](https://github.com/Fortran-FOSS-Programmers/ford), run: ```ford ford.md```\n\n### Supported plot types\n\n* `matplotlib.pyplot.plot` -- 2D/3D plot of lines and/or markers\n* `matplotlib.pyplot.bar` -- bar plot\n* `matplotlib.pyplot.contour` -- contour plot\n* `matplotlib.pyplot.contourf` -- filled contour plot\n* `matplotlib.pyplot.imshow` -- image plot\n* `matplotlib.pyplot.hist` -- histogram plot\n* `matplotlib.pyplot.errorbar` -- errorbar plot\n* `mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface` -- surface plot\n* `mpl_toolkits.mplot3d.axes3d.Axes3D.plot_wireframe` -- 3D wireframe\n\n### Example\n\nThe following example generates a plot of the sine function:\n\n```fortran\n program test\n\n use,intrinsic :: iso_fortran_env, only: wp =\u003e real64\n use pyplot_module\n\n implicit none\n\n real(wp),dimension(100) :: x,sx\n type(pyplot) :: plt\n integer :: i\n\n !generate some data:\n x = [(real(i,wp), i=0,size(x)-1)]/5.0_wp\n sx = sin(x)\n\n !plot it:\n call plt%initialize(grid=.true.,xlabel='angle (rad)',\u0026\n                     title='Plot of $\\sin(x)$',legend=.true.)\n call plt%add_plot(x,sx,label='$\\sin(x)$',linestyle='b-o',markersize=5,linewidth=2)\n call plt%savefig('sinx.png', pyfile='sinx.py')\n\n end program test\n```\n\n### Documentation\n\n * The API documentation for the current ```master``` branch can be found [here](https://jacobwilliams.github.io/pyplot-fortran/).  This is generated by processing the source files with [FORD](https://github.com/Fortran-FOSS-Programmers/ford).\n\n### See also\n\n * [Matplotlib](https://matplotlib.org)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobwilliams%2Fpyplot-fortran","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacobwilliams%2Fpyplot-fortran","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobwilliams%2Fpyplot-fortran/lists"}