mpl.cbook.pts_to_prestep()¶
-
mpl.cbook.pts_to_prestep(x, *args)[source]¶ Covert continuous line to pre-steps
Given a set of N points convert to 2 N -1 points which when connected linearly give a step function which changes values at the begining the intervals.
Parameters: x : array
The x location of the steps
y1, y2, ... : array
Any number of y arrays to be turned into steps. All must be the same length as
xReturns: x, y1, y2, .. : array
The x and y values converted to steps in the same order as the input. If the input is length
N, each of these arrays will be length2N + 1Examples
>> x_s, y1_s, y2_s = pts_to_prestep(x, y1, y2)