@@ -22,16 +22,35 @@ Changes in 1.2.x
22
22
now set the radius of the pie; setting the *radius * to 'None' (the default
23
23
value), will result in a pie with a radius of 1 as before.
24
24
25
- * Use of :func: `matplotlib.projections.projection_factory ` is now deprecated
25
+ * Use of :func: `~ matplotlib.projections.projection_factory ` is now deprecated
26
26
in favour of axes class identification using
27
- :func: `matplotlib.projections.process_projection_requirements ` followed by
28
- direct axes class invocation (at the time of writing, this is done by
29
- :meth: `matplotlib.figure.Figure.add_axes `,
30
- :meth: `matplotlib.figure.Figure.add_subplot ` and
31
- :meth: `matplotlib.figure.Figure.gca `.
27
+ :func: `~matplotlib.projections.process_projection_requirements ` followed by
28
+ direct axes class invocation (at the time of writing, functions which do this
29
+ are: :meth: `~matplotlib.figure.Figure.add_axes `,
30
+ :meth: `~matplotlib.figure.Figure.add_subplot ` and
31
+ :meth: `~matplotlib.figure.Figure.gca `). Therefore::
32
+
33
+
34
+ key = figure._make_key(*args, **kwargs)
35
+ ispolar = kwargs.pop('polar', False)
36
+ projection = kwargs.pop('projection', None)
37
+ if ispolar:
38
+ if projection is not None and projection != 'polar':
39
+ raise ValuError('polar and projection args are inconsistent')
40
+ projection = 'polar'
41
+ ax = projection_factory(projection, self, rect, **kwargs)
42
+ key = self._make_key(*args, **kwargs)
43
+
44
+ # is now
45
+
46
+ projection_class, kwargs, key = \
47
+ process_projection_requirements(self, *args, **kwargs)
48
+ ax = projection_class(self, rect, **kwargs)
49
+
32
50
This change means that third party objects can expose themselves as
33
- matplotlib axes by providing a ``_as_mpl_axes `` method (see
34
- :ref: `adding-new-scales ` for more detail).
51
+ matplotlib axes by providing a ``_as_mpl_axes `` method. See
52
+ :ref: `adding-new-scales ` for more detail.
53
+
35
54
36
55
Changes in 1.1.x
37
56
================
0 commit comments