All Projects → jacobwilliams → pyplot-fortran

jacobwilliams / pyplot-fortran

Licence: other
For generating plots from Fortran using Python's matplotlib.pyplot 📈

Programming Languages

fortran
972 projects

Projects that are alternatives of or similar to pyplot-fortran

geojsoncontour
Convert matplotlib contour plots to geojson
Stars: ✭ 78 (-50.63%)
Mutual labels:  matplotlib, contour-plot
awesome-matplotlib
A curated list of awesome repos and tutorials to develop great matplotlib graphs and diagrams
Stars: ✭ 154 (-2.53%)
Mutual labels:  matplotlib
Dexplot
Simple plotting library that wraps Matplotlib and integrated with DataFrames
Stars: ✭ 208 (+31.65%)
Mutual labels:  matplotlib
Jupyter Tips And Tricks
Using Project Jupyter for data science.
Stars: ✭ 245 (+55.06%)
Mutual labels:  matplotlib
Python Wechat Itchat
微信机器人,基于Python itchat接口功能实例展示:01-itchat获取微信好友或者微信群分享文章、02-itchat获取微信公众号文章、03-itchat监听微信公众号发送的文章、04 itchat监听微信群或好友撤回的消息、05 itchat获得微信好友信息以及表图对比、06 python打印出微信被删除好友、07 itchat自动回复好友、08 itchat微信好友个性签名词云图、09 itchat微信好友性别比例、10 微信群或微信好友撤回消息拦截、11 itchat微信群或好友之间转发消息
Stars: ✭ 216 (+36.71%)
Mutual labels:  matplotlib
Artificial Intelligence Deep Learning Machine Learning Tutorials
A comprehensive list of Deep Learning / Artificial Intelligence and Machine Learning tutorials - rapidly expanding into areas of AI/Deep Learning / Machine Vision / NLP and industry specific areas such as Climate / Energy, Automotives, Retail, Pharma, Medicine, Healthcare, Policy, Ethics and more.
Stars: ✭ 2,966 (+1777.22%)
Mutual labels:  matplotlib
Alyn
Detect and fix skew in images containing text
Stars: ✭ 202 (+27.85%)
Mutual labels:  matplotlib
matplotlib-draggable-plot
An example of draggable plot for matplotlib
Stars: ✭ 31 (-80.38%)
Mutual labels:  matplotlib
Python-Course
Python Basics, Machine Learning and Deep Learning
Stars: ✭ 50 (-68.35%)
Mutual labels:  matplotlib
The Elements Of Statistical Learning Notebooks
Jupyter notebooks for summarizing and reproducing the textbook "The Elements of Statistical Learning" 2/E by Hastie, Tibshirani, and Friedman
Stars: ✭ 241 (+52.53%)
Mutual labels:  matplotlib
Matplotlib Cheatsheet
Matplotlib 3.1 cheat sheet.
Stars: ✭ 2,806 (+1675.95%)
Mutual labels:  matplotlib
Edaviz
edaviz - Python library for Exploratory Data Analysis and Visualization in Jupyter Notebook or Jupyter Lab
Stars: ✭ 220 (+39.24%)
Mutual labels:  matplotlib
publib
Produce publication-level quality images on top of Matplotlib
Stars: ✭ 34 (-78.48%)
Mutual labels:  matplotlib
Windrose
A Python Matplotlib, Numpy library to manage wind data, draw windrose (also known as a polar rose plot), draw probability density function and fit Weibull distribution
Stars: ✭ 208 (+31.65%)
Mutual labels:  matplotlib
pyCircos
python Circos
Stars: ✭ 233 (+47.47%)
Mutual labels:  matplotlib
Cheatsheets Ai
Essential Cheat Sheets for deep learning and machine learning researchers https://medium.com/@kailashahirwar/essential-cheat-sheets-for-machine-learning-and-deep-learning-researchers-efb6a8ebd2e5
Stars: ✭ 14,095 (+8820.89%)
Mutual labels:  matplotlib
Contextily
Context geo-tiles in Python
Stars: ✭ 254 (+60.76%)
Mutual labels:  matplotlib
tsp-essay
A fun study of some heuristics for the Travelling Salesman Problem.
Stars: ✭ 15 (-90.51%)
Mutual labels:  matplotlib
Kagglestruggle
Kaggle Struggle
Stars: ✭ 228 (+44.3%)
Mutual labels:  matplotlib
ml-book
Codice sorgente ed Errata Corrige del mio libro "A tu per tu col Machine Learning"
Stars: ✭ 16 (-89.87%)
Mutual labels:  matplotlib

Pyplot-Fortran

A simple module for generating plots from Fortran using Python's matplotlib.pyplot.

Status

GitHub release Build Status codecov

Overview

Currently, 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.

The way it works is simply to generate a Python script with the plotting code, which is then executed from the command line using the Fortran execute_command_line function.

Compiling

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 fmp.toml file is provided for compiling pyplot-fortran with the Fortran Package Manager. For example, to build:

fpm build --profile release

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:

Preprocessor flag Kind Number of bytes
REAL32 real(kind=real32) 4
REAL64 real(kind=real64) 8
REAL128 real(kind=real128) 16

For example, to build a single precision version of the library, use:

fpm build --profile release --flag "-DREAL32"

To run the unit tests:

fpm test

To use pyplot-fortran within your fpm project, add the following to your fpm.toml file:

[dependencies]
pyplot-fortran = { git="https://github.com/jacobwilliams/pyplot-fortran.git" }

or, to use a specific version:

[dependencies]
pyplot-fortran = { git="https://github.com/jacobwilliams/pyplot-fortran.git", tag = "3.3.0" }

To generate the documentation using ford, run: ford pyplot-fortran.md

Supported plot types

  • matplotlib.pyplot.plot -- 2D/3D plot of lines and/or markers
  • matplotlib.pyplot.bar -- bar plot
  • matplotlib.pyplot.contour -- contour plot
  • matplotlib.pyplot.contourf -- filled contour plot
  • matplotlib.pyplot.imshow -- image plot
  • matplotlib.pyplot.hist -- histogram plot
  • matplotlib.pyplot.errorbar -- errorbar plot
  • mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface -- surface plot
  • mpl_toolkits.mplot3d.axes3d.Axes3D.plot_wireframe -- 3D wireframe

Example

The following example generates a plot of the sine function:

 program test

 use,intrinsic :: iso_fortran_env, only: wp => real64
 use pyplot_module

 implicit none

 real(wp),dimension(100) :: x,sx
 type(pyplot) :: plt
 integer :: i

 !generate some data:
 x = [(real(i,wp), i=0,size(x)-1)]/5.0_wp
 sx = sin(x)

 !plot it:
 call plt%initialize(grid=.true.,xlabel='angle (rad)',&
                     title='Plot of $\sin(x)$',legend=.true.)
 call plt%add_plot(x,sx,label='$\sin(x)$',linestyle='b-o',markersize=5,linewidth=2)
 call plt%savefig('sinx.png', pyfile='sinx.py')

 end program test

Documentation

  • The API documentation for the current master branch can be found here. This is generated by processing the source files with FORD.

See also

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].