https://github.com/notmatthancock/random_piecewise_plot
https://github.com/notmatthancock/random_piecewise_plot
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/notmatthancock/random_piecewise_plot
- Owner: notmatthancock
- License: gpl-2.0
- Created: 2016-01-23T22:15:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-20T11:08:06.000Z (about 9 years ago)
- Last Synced: 2025-01-28T23:44:36.629Z (4 months ago)
- Language: Python
- Size: 183 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Create random piecewise plots with Python. Dependencies are `matplotlib`, `numpy`, and `scipy`.
### example1.py
import matplotlib.pyplot as plt
import random_piecewise_plot as rppfig = plt.figure()
ax = fig.add_subplot(111)
rpp.random_piecewise_plot(ax, n_segments=3, degrees=[1,2,3], n_continuous=1, n_jump_holes=1)
plt.tight_layout()
plt.show()
### example2.py
import matplotlib.pyplot as plt
import random_piecewise_plot as rppfig = plt.figure(figsize=(11,10))
for i in range(9):
ax = fig.add_subplot(3,3,i+1)
rpp.random_piecewise_plot(ax)
plt.tight_layout()
plt.show()