## matplotlib-checkins

 SF.net SVN: matplotlib:[8754] branches/v1_0_maint/doc From: - 2010-10-15 13:34:57 ```Revision: 8754 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8754&view=rev Author: jdh2358 Date: 2010-10-15 13:34:49 +0000 (Fri, 15 Oct 2010) Log Message: ----------- added chipy talk video and some notes about transforms Modified Paths: -------------- branches/v1_0_maint/doc/_templates/indexsidebar.html branches/v1_0_maint/doc/users/transforms_tutorial.rst Modified: branches/v1_0_maint/doc/_templates/indexsidebar.html =================================================================== --- branches/v1_0_maint/doc/_templates/indexsidebar.html 2010-10-13 18:04:01 UTC (rev 8753) +++ branches/v1_0_maint/doc/_templates/indexsidebar.html 2010-10-15 13:34:49 UTC (rev 8754) @@ -27,7 +27,12 @@

Watch the SciPy; 2009 intro; and advanced; matplotlib tutorials

-

Watch a talk; about matplotlib presented at NIPS 08 Workshop MLOSS. +

Watch +a talk; about +matplotlib presented +at NIPS 08 +Workshop MLOSS and one presented; +at ChiPy;.

Modified: branches/v1_0_maint/doc/users/transforms_tutorial.rst =================================================================== --- branches/v1_0_maint/doc/users/transforms_tutorial.rst 2010-10-13 18:04:01 UTC (rev 8753) +++ branches/v1_0_maint/doc/users/transforms_tutorial.rst 2010-10-15 13:34:49 UTC (rev 8754) @@ -261,15 +261,27 @@ plt.show() +.. note:: + The blended transformations where x is in data coords and y in axes + coordinates is so useful that we have helper methods to return the + versions mpl uses internally for drawing ticks, ticklabels, etc. + The methods are :meth:`matplotlib.axes.Axes.get_xaxis_transform` and + :meth:`matplotlib.axes.Axes.get_yaxis_transform`. So in the example + above, the call to + :meth:`~matplotlib.transforms.blended_transform_factory` can be + replaced by ``get_xaxis_transform``:: + + trans = ax.get_xaxis_transform() + .. offset-transforms-shadow: Using offset transforms to create a shadow effect ================================================= One use of transformations is to create a new transformation that is -offset from another annotation, eg to place one object shifted a bit -relative to another object. Typically you want the shift to be in +offset from another transformation, eg to place one object shifted a +bit relative to another object. Typically you want the shift to be in some physical dimension, like points or inches rather than in data coordinates, so that the shift effect is constant at different zoom levels and dpi settings. @@ -301,8 +313,11 @@ shadow_transform = ax.transData + offset showing that can chain transformations using the addition operator. -This code says: first apply the data transformation ``ax.transData`` and -then translate the data by `dx` and `dy` points. +This code says: first apply the data transformation ``ax.transData`` +and then translate the data by `dx` and `dy` points. In typography, +a`point `_ is +1/72 inches, and by specifying your offsets in points, your figure +will look the same regardless of the dpi resolution it is saved in. .. plot:: :include-source: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```