Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aacc0a6

Browse files
updated readme
remove old build script and fobis file
1 parent dca3576 commit aacc0a6

File tree

3 files changed

+45
-184
lines changed

3 files changed

+45
-184
lines changed

‎README.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,49 @@ Currently, this module can be used to generate simple plots from Fortran. Event
1414
The way it works is simply to generate a Python script with the plotting code, which
1515
is then executed from the command line using the Fortran ```execute_command_line``` function.
1616

17-
The 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. A simple script ```build.sh``` is provided for building the library and test program (requires gfortran and [FoBiS](https://github.com/szaghi/FoBiS)). It will also build the HTML documentation if [FORD](https://github.com/Fortran-FOSS-Programmers/ford) is installed. A `fpm.toml` file is also provided for use with the [Fortran Package Manager](https://github.com/fortran-lang/fpm).
17+
### Compiling
18+
19+
The 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.
20+
21+
A `fmp.toml` file is provided for compiling pyplot-fortran with the [Fortran Package Manager](https://github.com/fortran-lang/fpm). For example, to build:
22+
23+
```
24+
fpm build --profile release
25+
```
26+
27+
By default, the library is built with double precision (`real64`) real values. Explicitly specifying the real kind can be done using the following processor flags:
28+
29+
Preprocessor flag | Kind | Number of bytes
30+
----------------- | ----- | ---------------
31+
`REAL32` | `real(kind=real32)` | 4
32+
`REAL64` | `real(kind=real64)` | 8
33+
`REAL128` | `real(kind=real128)` | 16
34+
35+
For example, to build a single precision version of the library, use:
36+
37+
```
38+
fpm build --profile release --flag "-DREAL32"
39+
```
40+
41+
To run the unit tests:
42+
43+
```
44+
fpm test
45+
```
46+
47+
To use `pyplot-fortran` within your fpm project, add the following to your `fpm.toml` file:
48+
```toml
49+
[dependencies]
50+
pyplot-fortran = { git="https://github.com/jacobwilliams/pyplot-fortran.git" }
51+
```
52+
53+
or, to use a specific version:
54+
```toml
55+
[dependencies]
56+
pyplot-fortran = { git="https://github.com/jacobwilliams/pyplot-fortran.git", tag = "3.1.0" }
57+
```
58+
59+
To generate the documentation using [ford](https://github.com/Fortran-FOSS-Programmers/ford), run: ```ford pyplot-fortran.md```
1860

1961
### Supported plot types
2062

@@ -30,7 +72,7 @@ The module requires a modern Fortran compiler (it uses various Fortran 2003/2008
3072

3173
The following example generates a plot of the sine function:
3274

33-
```Fortran
75+
```fortran
3476
program test
3577
3678
use,intrinsic :: iso_fortran_env, only: wp => real64
@@ -57,7 +99,7 @@ The following example generates a plot of the sine function:
5799

58100
### Documentation
59101

60-
* 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). Note that the build script will also generate these files automatically in the ```doc``` folder, assuming you have FORD installed.
102+
* 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).
61103

62104
### See also
63105

‎build.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

‎pyplot.fobis

Lines changed: 0 additions & 144 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /