@@ -2888,39 +2888,3 @@ def quad2cubic(q0x, q0y, q1x, q1y, q2x, q2y):
2888
2888
c2x , c2y = c1x + 1. / 3. * (q2x - q0x ), c1y + 1. / 3. * (q2y - q0y )
2889
2889
# c3x, c3y = q2x, q2y
2890
2890
return q0x , q0y , c1x , c1y , c2x , c2y , q2x , q2y
2891
-
2892
-
2893
- @cbook .deprecated ("2.2" )
2894
- def offset_line (y , yerr ):
2895
- """
2896
- Offsets an array *y* by +/- an error and returns a tuple
2897
- (y - err, y + err).
2898
-
2899
- The error term can be:
2900
-
2901
- * A scalar. In this case, the returned tuple is obvious.
2902
- * A vector of the same length as *y*. The quantities y +/- err are computed
2903
- component-wise.
2904
- * A tuple of length 2. In this case, yerr[0] is the error below *y* and
2905
- yerr[1] is error above *y*. For example::
2906
-
2907
- import numpy as np
2908
- import matplotlib.pyplot as plt
2909
-
2910
- x = np.linspace(0, 2*np.pi, num=100, endpoint=True)
2911
- y = np.sin(x)
2912
- y_minus, y_plus = mlab.offset_line(y, 0.1)
2913
- plt.plot(x, y)
2914
- plt.fill_between(x, y_minus, y2=y_plus)
2915
- plt.show()
2916
-
2917
- """
2918
- if cbook .is_numlike (yerr ) or (np .iterable (yerr ) and
2919
- len (yerr ) == len (y )):
2920
- ymin = y - yerr
2921
- ymax = y + yerr
2922
- elif len (yerr ) == 2 :
2923
- ymin , ymax = y - yerr [0 ], y + yerr [1 ]
2924
- else :
2925
- raise ValueError ("yerr must be scalar, 1xN or 2xN" )
2926
- return ymin , ymax
0 commit comments