Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clarify that scatter markers are now specified in degrees, not radian…

…s. Closes #547
  • Loading branch information...
commit 43dc7293aba1ad7f243a9b2fdc7c38897b821a79 1 parent 04ab292
@mdboom mdboom authored
Showing with 19 additions and 15 deletions.
  1. +18 −14 doc/api/api_changes.rst
  2. +1 −1  lib/matplotlib/markers.py
View
32 doc/api/api_changes.rst
@@ -14,6 +14,10 @@ For new features that were added to matplotlib, please see
Changes in 1.2.x
================
+* In :meth:`~matplotlib.axes.Axes.scatter`, and `~pyplot.scatter`,
+ when specifying a marker using a tuple, the angle is now specified
+ in degrees, not radians.
+
* In :meth:`~matplotlib.axes.Axes.contourf`, the handling of the *extend*
kwarg has changed. Formerly, the extended ranges were mapped
after to 0, 1 after being normed, so that they always corresponded
@@ -73,41 +77,41 @@ Changes in 1.2.x
*capthick*.
* Transform subclassing behaviour is now subtly changed. If your transform
- implements a non-affine transformation, then it should override the
+ implements a non-affine transformation, then it should override the
``transform_non_affine`` method, rather than the generic ``transform`` method.
Previously transforms would define ``transform`` and then copy the
method into ``transform_non_affine``:
-
+
class MyTransform(mtrans.Transform):
def transform(self, xy):
...
transform_non_affine = transform
-
+
This approach will no longer function correctly and should be changed to:
-
+
class MyTransform(mtrans.Transform):
def transform_non_affine(self, xy):
...
-
+
* Artists no longer have ``x_isdata`` or ``y_isdata`` attributes; instead
any artist's transform can be interrogated with
``artist_instance.get_transform().contains_branch(ax.transData)``
-
+
* Lines added to an axes now take into account their transform when updating the
data and view limits. This means transforms can now be used as a pre-transform.
For instance:
-
+
>>> import matplotlib.pyplot as plt
>>> import matplotlib.transforms as mtrans
>>> ax = plt.axes()
>>> ax.plot(range(10), transform=mtrans.Affine2D().scale(10) + ax.transData)
>>> print(ax.viewLim)
Bbox('array([[ 0., 0.],\n [ 90., 90.]])')
-
+
* One can now easily get a transform which goes from one transform's coordinate system
to another, in an optimized way, using the new subtract method on a transform. For instance,
to go from data coordinates to axes coordinates::
-
+
>>> import matplotlib.pyplot as plt
>>> ax = plt.axes()
>>> data2ax = ax.transData - ax.transAxes
@@ -115,14 +119,14 @@ Changes in 1.2.x
3, 1
>>> print(data2ax.depth)
2
-
- for versions before 1.2 this could only be achieved in a sub-optimal way, using
- ``ax.transData + ax.transAxes.inverted()`` (depth is a new concept, but had it existed
- it would return 4 for this example).
+
+ for versions before 1.2 this could only be achieved in a sub-optimal way, using
+ ``ax.transData + ax.transAxes.inverted()`` (depth is a new concept, but had it existed
+ it would return 4 for this example).
* ``twinx`` and ``twiny`` now returns an instance of SubplotBase if
parent axes is an instance of SubplotBase.
-
+
Changes in 1.1.x
================
View
2  lib/matplotlib/markers.py
@@ -49,7 +49,7 @@ class MarkerStyle:
===== =============================================
*angle*:
- the angle of rotation of the symbol
+ the angle of rotation of the symbol, in degrees
For backward compatibility, the form (*verts*, 0) is also accepted,
but it is equivalent to just *verts* for giving a raw set of vertices
Please sign in to comment.
Something went wrong with that request. Please try again.