Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d073a36

Browse files
authored
Merge pull request #26447 from QuLogic/no-blockquote
DOC: Fix accidental cases of blockquotes
2 parents 440f761 + 1bb81a8 commit d073a36

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+694
-710
lines changed

doc/api/prev_api_changes/api_changes_0.54.rst

Lines changed: 91 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -76,137 +76,136 @@ Object interface - Application programmers
7676
Autoscaling
7777
~~~~~~~~~~~
7878

79-
The x and y axis instances no longer have autoscale view. These are
80-
handled by axes.autoscale_view
79+
The x and y axis instances no longer have autoscale view. These are
80+
handled by axes.autoscale_view
8181

8282
Axes creation
8383
~~~~~~~~~~~~~
8484

85-
You should not instantiate your own Axes any more using the OO API.
86-
Rather, create a Figure as before and in place of::
85+
You should not instantiate your own Axes any more using the OO API.
86+
Rather, create a Figure as before and in place of::
8787

88-
f = Figure(figsize=(5,4), dpi=100)
89-
a = Subplot(f, 111)
90-
f.add_axis(a)
88+
f = Figure(figsize=(5,4), dpi=100)
89+
a = Subplot(f, 111)
90+
f.add_axis(a)
9191

92-
use::
92+
use::
9393

94-
f = Figure(figsize=(5,4), dpi=100)
95-
a = f.add_subplot(111)
94+
f = Figure(figsize=(5,4), dpi=100)
95+
a = f.add_subplot(111)
9696

97-
That is, add_axis no longer exists and is replaced by::
97+
That is, add_axis no longer exists and is replaced by::
9898

99-
add_axes(rect, axisbg=defaultcolor, frameon=True)
100-
add_subplot(num, axisbg=defaultcolor, frameon=True)
99+
add_axes(rect, axisbg=defaultcolor, frameon=True)
100+
add_subplot(num, axisbg=defaultcolor, frameon=True)
101101

102102
Artist methods
103103
~~~~~~~~~~~~~~
104104

105-
If you define your own Artists, you need to rename the _draw method
106-
to draw
105+
If you define your own Artists, you need to rename the _draw method
106+
to draw
107107

108108
Bounding boxes
109109
~~~~~~~~~~~~~~
110110

111-
matplotlib.transforms.Bound2D is replaced by
112-
matplotlib.transforms.Bbox. If you want to construct a bbox from
113-
left, bottom, width, height (the signature for Bound2D), use
114-
matplotlib.transforms.lbwh_to_bbox, as in
111+
matplotlib.transforms.Bound2D is replaced by
112+
matplotlib.transforms.Bbox. If you want to construct a bbox from
113+
left, bottom, width, height (the signature for Bound2D), use
114+
matplotlib.transforms.lbwh_to_bbox, as in::
115115

116116
bbox = clickBBox = lbwh_to_bbox(left, bottom, width, height)
117117

118-
The Bbox has a different API than the Bound2D. e.g., if you want to
119-
get the width and height of the bbox
118+
The Bbox has a different API than the Bound2D. e.g., if you want to
119+
get the width and height of the bbox
120120

121-
OLD::
122-
width = fig.bbox.x.interval()
123-
height = fig.bbox.y.interval()
121+
**OLD**::
124122

125-
New::
126-
width = fig.bbox.width()
127-
height = fig.bbox.height()
123+
width = fig.bbox.x.interval()
124+
height = fig.bbox.y.interval()
128125

126+
**NEW**::
129127

128+
width = fig.bbox.width()
129+
height = fig.bbox.height()
130130

131131

132132
Object constructors
133133
~~~~~~~~~~~~~~~~~~~
134134

135-
You no longer pass the bbox, dpi, or transforms to the various
136-
Artist constructors. The old way or creating lines and rectangles
137-
was cumbersome because you had to pass so many attributes to the
138-
Line2D and Rectangle classes not related directly to the geometry
139-
and properties of the object. Now default values are added to the
140-
object when you call axes.add_line or axes.add_patch, so they are
141-
hidden from the user.
135+
You no longer pass the bbox, dpi, or transforms to the various
136+
Artist constructors. The old way or creating lines and rectangles
137+
was cumbersome because you had to pass so many attributes to the
138+
Line2D and Rectangle classes not related directly to the geometry
139+
and properties of the object. Now default values are added to the
140+
object when you call axes.add_line or axes.add_patch, so they are
141+
hidden from the user.
142142

143-
If you want to define a custom transformation on these objects, call
144-
o.set_transform(trans) where trans is a Transformation instance.
143+
If you want to define a custom transformation on these objects, call
144+
o.set_transform(trans) where trans is a Transformation instance.
145145

146-
In prior versions of you wanted to add a custom line in data coords,
147-
you would have to do
146+
In prior versions of you wanted to add a custom line in data coords,
147+
you would have to do::
148148

149-
l = Line2D(dpi, bbox, x, y,
150-
color = color,
151-
transx = transx,
152-
transy = transy,
153-
)
149+
l = Line2D(dpi, bbox, x, y,
150+
color = color,
151+
transx = transx,
152+
transy = transy,
153+
)
154154

155-
now all you need is
155+
now all you need is::
156156

157-
l = Line2D(x, y, color=color)
157+
l = Line2D(x, y, color=color)
158158

159-
and the axes will set the transformation for you (unless you have
160-
set your own already, in which case it will eave it unchanged)
159+
and the axes will set the transformation for you (unless you have
160+
set your own already, in which case it will eave it unchanged)
161161

162162
Transformations
163163
~~~~~~~~~~~~~~~
164164

165-
The entire transformation architecture has been rewritten.
166-
Previously the x and y transformations where stored in the xaxis and
167-
yaxis instances. The problem with this approach is it only allows
168-
for separable transforms (where the x and y transformations don't
169-
depend on one another). But for cases like polar, they do. Now
170-
transformations operate on x,y together. There is a new base class
171-
matplotlib.transforms.Transformation and two concrete
172-
implementations, matplotlib.transforms.SeparableTransformation and
173-
matplotlib.transforms.Affine. The SeparableTransformation is
174-
constructed with the bounding box of the input (this determines the
175-
rectangular coordinate system of the input, i.e., the x and y view
176-
limits), the bounding box of the display, and possibly nonlinear
177-
transformations of x and y. The 2 most frequently used
178-
transformations, data coordinates -> display and axes coordinates ->
179-
display are available as ax.transData and ax.transAxes. See
180-
alignment_demo.py which uses axes coords.
181-
182-
Also, the transformations should be much faster now, for two reasons
183-
184-
* they are written entirely in extension code
185-
186-
* because they operate on x and y together, they can do the entire
187-
transformation in one loop. Earlier I did something along the
188-
lines of::
189-
190-
xt = sx*func(x) + tx
191-
yt = sy*func(y) + ty
192-
193-
Although this was done in numerix, it still involves 6 length(x)
194-
for-loops (the multiply, add, and function evaluation each for x
195-
and y). Now all of that is done in a single pass.
196-
197-
198-
If you are using transformations and bounding boxes to get the
199-
cursor position in data coordinates, the method calls are a little
200-
different now. See the updated examples/coords_demo.py which shows
201-
you how to do this.
202-
203-
Likewise, if you are using the artist bounding boxes to pick items
204-
on the canvas with the GUI, the bbox methods are somewhat
205-
different. You will need to see the updated
206-
examples/object_picker.py.
207-
208-
See unit/transforms_unit.py for many examples using the new
209-
transformations.
165+
The entire transformation architecture has been rewritten.
166+
Previously the x and y transformations where stored in the xaxis and
167+
yaxis instances. The problem with this approach is it only allows
168+
for separable transforms (where the x and y transformations don't
169+
depend on one another). But for cases like polar, they do. Now
170+
transformations operate on x,y together. There is a new base class
171+
matplotlib.transforms.Transformation and two concrete
172+
implementations, matplotlib.transforms.SeparableTransformation and
173+
matplotlib.transforms.Affine. The SeparableTransformation is
174+
constructed with the bounding box of the input (this determines the
175+
rectangular coordinate system of the input, i.e., the x and y view
176+
limits), the bounding box of the display, and possibly nonlinear
177+
transformations of x and y. The 2 most frequently used
178+
transformations, data coordinates -> display and axes coordinates ->
179+
display are available as ax.transData and ax.transAxes. See
180+
alignment_demo.py which uses axes coords.
181+
182+
Also, the transformations should be much faster now, for two reasons
183+
184+
* they are written entirely in extension code
185+
186+
* because they operate on x and y together, they can do the entire
187+
transformation in one loop. Earlier I did something along the
188+
lines of::
189+
190+
xt = sx*func(x) + tx
191+
yt = sy*func(y) + ty
192+
193+
Although this was done in numerix, it still involves 6 length(x)
194+
for-loops (the multiply, add, and function evaluation each for x
195+
and y). Now all of that is done in a single pass.
196+
197+
If you are using transformations and bounding boxes to get the
198+
cursor position in data coordinates, the method calls are a little
199+
different now. See the updated examples/coords_demo.py which shows
200+
you how to do this.
201+
202+
Likewise, if you are using the artist bounding boxes to pick items
203+
on the canvas with the GUI, the bbox methods are somewhat
204+
different. You will need to see the updated
205+
examples/object_picker.py.
206+
207+
See unit/transforms_unit.py for many examples using the new
208+
transformations.
210209

211210

212211
.. highlight:: none

doc/api/prev_api_changes/api_changes_0.98.0.rst

Lines changed: 24 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -282,44 +282,33 @@ Old method New method
282282

283283
New methods:
284284

285-
* :meth:`draw_path(self, gc, path, transform, rgbFace)
286-
<matplotlib.backend_bases.RendererBase.draw_path>`
287-
288-
* :meth:`draw_markers(self, gc, marker_path, marker_trans, path,
289-
trans, rgbFace)
290-
<matplotlib.backend_bases.RendererBase.draw_markers>`
291-
292-
* :meth:`draw_path_collection(self, master_transform, cliprect,
293-
clippath, clippath_trans, paths, all_transforms, offsets,
294-
offsetTrans, facecolors, edgecolors, linewidths, linestyles,
295-
antialiaseds)
296-
<matplotlib.backend_bases.RendererBase.draw_path_collection>`
297-
*[optional]*
285+
* :meth:`draw_path(self, gc, path, transform, rgbFace)
286+
<matplotlib.backend_bases.RendererBase.draw_path>`
287+
* :meth:`draw_markers(self, gc, marker_path, marker_trans, path,
288+
trans, rgbFace)
289+
<matplotlib.backend_bases.RendererBase.draw_markers>`
290+
* :meth:`draw_path_collection(self, master_transform, cliprect,
291+
clippath, clippath_trans, paths, all_transforms, offsets,
292+
offsetTrans, facecolors, edgecolors, linewidths, linestyles,
293+
antialiaseds)
294+
<matplotlib.backend_bases.RendererBase.draw_path_collection>`
295+
*[optional]*
298296

299297
Changed methods:
300298

301-
* ``draw_image(self, x, y, im, bbox)`` is now
302-
:meth:`draw_image(self, x, y, im, bbox, clippath, clippath_trans)
303-
<matplotlib.backend_bases.RendererBase.draw_image>`
299+
* ``draw_image(self, x, y, im, bbox)`` is now
300+
:meth:`draw_image(self, x, y, im, bbox, clippath, clippath_trans)
301+
<matplotlib.backend_bases.RendererBase.draw_image>`
304302

305303
Removed methods:
306304

307-
* ``draw_arc``
308-
309-
* ``draw_line_collection``
310-
311-
* ``draw_line``
312-
313-
* ``draw_lines``
314-
315-
* ``draw_point``
316-
317-
* ``draw_quad_mesh``
318-
319-
* ``draw_poly_collection``
320-
321-
* ``draw_polygon``
322-
323-
* ``draw_rectangle``
324-
325-
* ``draw_regpoly_collection``
305+
* ``draw_arc``
306+
* ``draw_line_collection``
307+
* ``draw_line``
308+
* ``draw_lines``
309+
* ``draw_point``
310+
* ``draw_quad_mesh``
311+
* ``draw_poly_collection``
312+
* ``draw_polygon``
313+
* ``draw_rectangle``
314+
* ``draw_regpoly_collection``

doc/api/prev_api_changes/api_changes_0.98.x.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@ Changes for 0.98.x
3333
are given as a fraction of the font-size. Also, *scatteryoffsets*,
3434
*fancybox* and *columnspacing* are added as keyword parameters.
3535

36-
================ ================
37-
Deprecated New
38-
================ ================
39-
pad borderpad
40-
labelsep labelspacing
41-
handlelen handlelength
42-
handlestextsep handletextpad
43-
axespad borderaxespad
44-
================ ================
45-
36+
================ ================
37+
Deprecated New
38+
================ ================
39+
pad borderpad
40+
labelsep labelspacing
41+
handlelen handlelength
42+
handlestextsep handletextpad
43+
axespad borderaxespad
44+
================ ================
4645

4746
* Removed the configobj and experimental traits rc support
4847

0 commit comments

Comments
 (0)