This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Code snippet to plot multiple triangle's in Matplotlib using different methods. | |
''' | |
import time | |
import sys | |
import matplotlib.pyplot as pp | |
import numpy as np | |
from matplotlib.collections import PolyCollection | |
import random | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEX = pdflatex -interaction nonstopmode | |
BIB = bibtex | |
GS = gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite | |
COVER = cover | |
PAPER = paper_main | |
SUPP = paper_supp | |
BIBFILE = temp.bib | |
BUNDLE = paper_bundle.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def peakdetect(y_axis, x_axis = None, lookahead = 500, delta = 0): | |
""" | |
Converted from/based on a MATLAB script at http://billauer.co.il/peakdet.html | |
Algorithm for detecting local maximas and minmias in a signal. | |
Discovers peaks by searching for values which are surrounded by lower | |
or larger values for maximas and minimas respectively | |