Alphabetical list Categories
ecoplot Economically plot large datasets
Call signature:

ecoplot(x0, dx, yy, N=100)

Help text:

ecoplot(x0, dx, yy, n) plots the data (xx,yy) using sampleminmax to reduce data length to the given number of points.
The results are plotted as a patch.
x-coordinates are implied to be [x0, x0+dx, x0+2*dx, ...], along yy.
If n is omitted, it defaults to 100.
Note: This is the kind of plot that MEABench calls "TrueBlue".

Example:

import pyqplot as qp

import numpy as np

qp.figure('ecoplot', 3, 3)

N = 1000000

tt = np.arange(N)

yy = (np.mod(tt, 100000)==30000).astype(float) \

- (np.mod(tt, 130000)==45000).astype(float) \

+ np.random.randn(N)/15

qp.pen('k', 0)

qp.brush('k')

# Plot at 300 dpi but don't lose any spikes

qp.ecoplot(tt[0], tt[1]-tt[0], yy, 3*300)

QPlot Documentation — (C) Daniel Wagenaar, 2019