Plot potential energy diagram in python
Project description
pyEnergyDiagram
Installation
pip install pyenergydiagrams
Usage
from pyenergydiagrams import State, Diagram
import matplotlib.pyplot as plt
states = [State((-1) ** i) for i in range(20)]
states[5] = State(-3)
states[13] = State(-5)
my_diagram = Diagram(states)
plt.plot(my_diagram.x, my_diagram.y)
my_diagram.add_dotted_line(states[-2], dx_right=2)
my_diagram.add_arrow(states[14], states[13], "$E_1$")
my_diagram.add_arrow(states[-1], states[-2], "$E_2$")
plt.show()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyenergydiagrams-0.3.1.tar.gz
(37.2 kB
view hashes)
Built Distribution
Close
Hashes for pyenergydiagrams-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0225e1604e8a94ba9e3d5534c63e203729e5f45a898324ba2c13bf521864d18 |
|
MD5 | 5469c9dfb09af6ce28cec10d2028050e |
|
BLAKE2b-256 | b64b9b30f6387ed907eebc8ad20030d3ce018d649a3f8158025a2826fb42848e |