Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zoziha/easy_plplot
Matplotlib personality wrapper for PlPlot in Fortran
https://github.com/zoziha/easy_plplot
fortran fortran-library fortran-package-manager fpm matplotlib plot plotting plplot plplot-bindings
Last synced: 4 days ago
JSON representation
Matplotlib personality wrapper for PlPlot in Fortran
- Host: GitHub
- URL: https://github.com/zoziha/easy_plplot
- Owner: zoziha
- License: bsd-3-clause
- Created: 2021-11-21T07:53:39.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-20T14:45:26.000Z (over 2 years ago)
- Last Synced: 2024-01-29T08:48:52.872Z (11 months ago)
- Topics: fortran, fortran-library, fortran-package-manager, fpm, matplotlib, plot, plotting, plplot, plplot-bindings
- Language: Fortran
- Homepage: https://easy-plplot-api.netlify.app/
- Size: 320 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Easy Plplot
[![Netlify Status](https://api.netlify.com/api/v1/badges/a6d36a1c-03a6-4a41-b069-4fd65e3c7673/deploy-status)](https://app.netlify.com/sites/easy-plplot-api/deploys)
`easy_plplot` is a wrapper for PlPlot inspired by the interface of
`matplotlib`. It is intended to fill the need for rapid feedback while
developing numerical simulations, and does not replace more
sophisticated packages such as matplotlib or even direct use of PlPlot.While it is possible that the output from `easy_plplot` may be considered
as publication quality, no assertion is made along those lines. This
software has been written in the hope that it will be useful,
especially for students in numerical analysis courses based on Fortran.Documentation can be found [here](https://easy-plplot-api.netlify.app/).
## Getting Started
### Supported Compilers
The following combinations are supported:
|Name|Vesrion|Platform|Architecture|
|:-:|:-:|:-:|:-:|
|GCC Fortran(MSYS2)|11|Windows 10|x86_64|### Dependencies
- [Plplot 5.15.0](https://sourceforge.net/projects/plplot/files/plplot/5.15.0%20Source/)
- libgd 2.3.2
- [Fortran-lang/fpm](https://github.com/fortran-lang/fpm) 0.5.0PS: It seems that the `plplot-fortran` of the `debian` and `ubuntu` distribution warehouses does not take into account the `*.mod` files, so it is best to use `cmake` to install plplot by yourself.
#### Build Environment in MSYS2
```sh
pacman -S 64/mingw-w64--x86_64-plplot
pacman -S 64/mingw-w64--x86_64-libgd
```### Build with [Fortran-lang/fpm](https://github.com/fortran-lang/fpm)
Fortran Package Manager (fpm) is a package manager and build system for Fortran.
You can build `easy_plplot` using provided `fpm.toml`:```sh
export FPM_FFLAGS="-Ipath/to/plplot/include"
fpm run --example --all
```To use `easy_plplot` within your `fpm` project, add the following lines to your `fpm.toml` file:
```toml
[dependencies]
easy_plplot = { git="https://github.com/zoziha/easy_plplot" }
```### Usage
See [more usage](https://easy-plplot-api.netlify.app/page/index.html)🎯.
```fortran
!> Create the project logo
program logo_prg
use utilities_m
use easy_plplot_m
implicit none
real(wp), parameter :: pi = acos(-1.0d0)call setup(device='svg', fileName='build/logo-%n.svg', figSize=[600, 500])
call makeLogo
call show()contains
subroutine makeLogo
real(wp), dimension(:), allocatable :: x, y1, y2, y3x = linspace(0.0_wp, 1.0_wp, 100)
y1 = x**2 - 1.0_wp
y2 = 2.0_wp*x - 1.0_wp
y3 = x
y3 = cos(2.0_wp*PI*x)call figure()
call subplot(1, 1, 1)
call xylim(mixval(x), mixval([y1, y2, y3])*1.1_wp)call plot(x, y1, lineColor='b', lineWidth=1.2_wp)
call plot(x, y2, lineColor='r', lineWidth=1.2_wp)
call plot(x, y3, lineColor='c', lineWidth=1.2_wp)call ticks(lineWidth=1.2_wp)
call labels('', '', '')
end subroutine makeLogoend program logo_prg
```
## Links
- [PlPlot](http://PlPlot.sourceforge.net/)
- [hornekyle/plplotlib](https://github.com/hornekyle/plplotlib)Thanks to `PlPlot` written by Alan W. Irwin and other contributors.
Thanks to the Fortran interface of `PlPlot` written by Arjen Markus.
Thanks to the `plplotlib` high-level interfaces written by Dr Kyle Horne.Thanks for your all contributions. Salute!
### Other Plot-related Fortran Projects
- [jacobwilliams/pyplot-fortran](https://github.com/jacobwilliams/pyplot-fortran)
- [kookma/ogpf](https://github.com/kookma/ogpf)