plofeld
"One of these days we must invent a faster-working field plotter!"
plofeld is a python plotting library for physical fields.
Installing
Installation is easily done via pip:
pip install plofeld
required are numpy, scipy, pandas, matplotlib.
Usage
First one needs to place some Elements, in this example
PointCharges around your coordinate system.
The positions of these Elements need to be given in Vectors.
This list is then passed on to the StaticField class, which creates the
field.
The field can then be plotted with the StaticField().plot() function.
from matplotlib import pyplot as plt
from plofeld.elements import PointCharge
from plofeld.fields import StaticField
from plofeld.utils.classes import Vector
from plofeld.utils.constants import ELECTRIC
def plot_two_charges():
charges = [
PointCharge(Vector(x=1, y=0), q=-1),
PointCharge(Vector(x=-1, y=0), q=1),
]
field = StaticField(charges, field_type=ELECTRIC)
field.plot(xlim=(-2, 2), ylim=(-2, 2))
plt.show()
if __name__ == '__main__':
plot_two_charges()
This code and more can be found in the examples folder.
Metadata
Release files for plofeld 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| plofeld-0.0.1.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| plofeld-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.4 kB
Release files / plofeld-0.0.1.tar.gz
| Download URL | plofeld-0.0.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea5b1bf8474168da837cd5fb9d8e8b693b82a7687a585d47498422be879bb982
|
|
BLAKE2b-256 checksum How to use checksums |
6037230b7e807ba8a844afaca2ac69b11b31c8211b4f5b64726c4ad4ed9bb0a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
|
Release files / plofeld-0.0.1-py3-none-any.whl
| Download URL | plofeld-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7c50048d138eee368301b760fa6012880c5da88419fd594119a2173f619fb59
|
|
BLAKE2b-256 checksum How to use checksums |
c632d93703c50e724b310c69c03671dcce987428380feccf53029fde91bb8e7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
|