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

Skip to content

Commit 43dc729

Browse files
committed
Clarify that scatter markers are now specified in degrees, not radians. Closes #547
1 parent 04ab292 commit 43dc729

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

doc/api/api_changes.rst

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ For new features that were added to matplotlib, please see
1414
Changes in 1.2.x
1515
================
1616

17+
* In :meth:`~matplotlib.axes.Axes.scatter`, and `~pyplot.scatter`,
18+
when specifying a marker using a tuple, the angle is now specified
19+
in degrees, not radians.
20+
1721
* In :meth:`~matplotlib.axes.Axes.contourf`, the handling of the *extend*
1822
kwarg has changed. Formerly, the extended ranges were mapped
1923
after to 0, 1 after being normed, so that they always corresponded
@@ -73,56 +77,56 @@ Changes in 1.2.x
7377
*capthick*.
7478

7579
* Transform subclassing behaviour is now subtly changed. If your transform
76-
implements a non-affine transformation, then it should override the
80+
implements a non-affine transformation, then it should override the
7781
``transform_non_affine`` method, rather than the generic ``transform`` method.
7882
Previously transforms would define ``transform`` and then copy the
7983
method into ``transform_non_affine``:
80-
84+
8185
class MyTransform(mtrans.Transform):
8286
def transform(self, xy):
8387
...
8488
transform_non_affine = transform
85-
89+
8690
This approach will no longer function correctly and should be changed to:
87-
91+
8892
class MyTransform(mtrans.Transform):
8993
def transform_non_affine(self, xy):
9094
...
91-
95+
9296
* Artists no longer have ``x_isdata`` or ``y_isdata`` attributes; instead
9397
any artist's transform can be interrogated with
9498
``artist_instance.get_transform().contains_branch(ax.transData)``
95-
99+
96100
* Lines added to an axes now take into account their transform when updating the
97101
data and view limits. This means transforms can now be used as a pre-transform.
98102
For instance:
99-
103+
100104
>>> import matplotlib.pyplot as plt
101105
>>> import matplotlib.transforms as mtrans
102106
>>> ax = plt.axes()
103107
>>> ax.plot(range(10), transform=mtrans.Affine2D().scale(10) + ax.transData)
104108
>>> print(ax.viewLim)
105109
Bbox('array([[ 0., 0.],\n [ 90., 90.]])')
106-
110+
107111
* One can now easily get a transform which goes from one transform's coordinate system
108112
to another, in an optimized way, using the new subtract method on a transform. For instance,
109113
to go from data coordinates to axes coordinates::
110-
114+
111115
>>> import matplotlib.pyplot as plt
112116
>>> ax = plt.axes()
113117
>>> data2ax = ax.transData - ax.transAxes
114118
>>> print(ax.transData.depth, ax.transAxes.depth)
115119
3, 1
116120
>>> print(data2ax.depth)
117121
2
118-
119-
for versions before 1.2 this could only be achieved in a sub-optimal way, using
120-
``ax.transData + ax.transAxes.inverted()`` (depth is a new concept, but had it existed
121-
it would return 4 for this example).
122+
123+
for versions before 1.2 this could only be achieved in a sub-optimal way, using
124+
``ax.transData + ax.transAxes.inverted()`` (depth is a new concept, but had it existed
125+
it would return 4 for this example).
122126

123127
* ``twinx`` and ``twiny`` now returns an instance of SubplotBase if
124128
parent axes is an instance of SubplotBase.
125-
129+
126130

127131
Changes in 1.1.x
128132
================

lib/matplotlib/markers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class MarkerStyle:
4949
===== =============================================
5050
5151
*angle*:
52-
the angle of rotation of the symbol
52+
the angle of rotation of the symbol, in degrees
5353
5454
For backward compatibility, the form (*verts*, 0) is also accepted,
5555
but it is equivalent to just *verts* for giving a raw set of vertices

0 commit comments

Comments
 (0)