Skip to content

PyPI Downloads PyPI Version

Commit activity License Build

Python Version Wheel





from matplotlib import pyplot
import numpy

import phaseportrait

def pendulum(θ, dθ):
    return dθ, - numpy.sin(θ)

SimplePendulum = phaseportrait.PhasePortrait2D(pendulum, [-9, 9], Title='Simple pendulum', xlabel=r"$\Theta$", ylabel=r"$\dot{\Theta}$")
SimplePendulum.plot()

Documentation

To check out phaseportrait's documentation, view some examples and read more about it, check our website or try our Graphical User Interface!

What's this?

The idea behind this project was to create a simple way to make phase portraits in 2D and 3D in Python, as we couldn't find something similar on the internet, so we got down to work. (Update: found jmoy/plotdf, offers similar 2D phase plots but it is very limited).

Eventually, we did some work on bifurcations, 1D maps and chaos in 3D trayectories.

This idea came while taking a course in non linear dynamics and chaos, during the 3rd year of physics degree, brought by our desire of visualizing things and programming.

We want to state that we are self-taught into making this kind of stuff, and we've tried to make things as professionally as possible, any comments about improving our work are welcome!

Authors

  • Víctor Loras Herrero (vhloras@gmail.com)
  • Unai Lería Fortea (unaileria@gmail.com)

Contributing

This proyect is open-source, everyone can download, use and contribute. To do that, several options are offered: