|
76 | 76 | # ============== |
77 | 77 | # |
78 | 78 | # Some of the path components require multiple vertices to specify them: |
79 | | -# for example CURVE 3 is a `bézier |
| 79 | +# for example CURVE 3 is a `Bézier |
80 | 80 | # <https://en.wikipedia.org/wiki/B%C3%A9zier_curve>`_ curve with one |
81 | 81 | # control point and one end point, and CURVE4 has three vertices for the |
82 | 82 | # two control points and the end point. The example below shows a |
83 | | -# CURVE4 Bézier spline -- the bézier curve will be contained in the |
| 83 | +# CURVE4 Bézier spline -- the Bézier curve will be contained in the |
84 | 84 | # convex hull of the start point, the two control points, and the end |
85 | 85 | # point |
86 | 86 |
|
|
139 | 139 | # for each histogram bar: the rectangle width is the bin width and the |
140 | 140 | # rectangle height is the number of datapoints in that bin. First we'll |
141 | 141 | # create some random normally distributed data and compute the |
142 | | -# histogram. Because numpy returns the bin edges and not centers, the |
143 | | -# length of ``bins`` is 1 greater than the length of ``n`` in the |
| 142 | +# histogram. Because NumPy returns the bin edges and not centers, the |
| 143 | +# length of ``bins`` is one greater than the length of ``n`` in the |
144 | 144 | # example below:: |
145 | 145 | # |
146 | 146 | # # histogram our data with numpy |
|
159 | 159 | # |
160 | 160 | # Now we have to construct our compound path, which will consist of a |
161 | 161 | # series of ``MOVETO``, ``LINETO`` and ``CLOSEPOLY`` for each rectangle. |
162 | | -# For each rectangle, we need 5 vertices: 1 for the ``MOVETO``, 3 for |
163 | | -# the ``LINETO``, and 1 for the ``CLOSEPOLY``. As indicated in the |
164 | | -# table above, the vertex for the closepoly is ignored but we still need |
165 | | -# it to keep the codes aligned with the vertices:: |
| 162 | +# For each rectangle, we need five vertices: one for the ``MOVETO``, |
| 163 | +# three for the ``LINETO``, and one for the ``CLOSEPOLY``. As indicated |
| 164 | +# in the table above, the vertex for the closepoly is ignored but we still |
| 165 | +# need it to keep the codes aligned with the vertices:: |
166 | 166 | # |
167 | 167 | # nverts = nrects*(1+3+1) |
168 | 168 | # verts = np.zeros((nverts, 2)) |
|
0 commit comments