|
From: <jd...@us...> - 2009-08-06 14:56:02
|
Revision: 7400
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7400&view=rev
Author: jdh2358
Date: 2009-08-06 14:55:54 +0000 (Thu, 06 Aug 2009)
Log Message:
-----------
update whats new
Modified Paths:
--------------
branches/v0_99_maint/doc/users/whats_new.rst
Added Paths:
-----------
branches/v0_99_maint/doc/pyplots/whats_new_99_axes_grid.py
branches/v0_99_maint/doc/pyplots/whats_new_99_mplot3d.py
branches/v0_99_maint/doc/pyplots/whats_new_99_spines.py
Added: branches/v0_99_maint/doc/pyplots/whats_new_99_axes_grid.py
===================================================================
--- branches/v0_99_maint/doc/pyplots/whats_new_99_axes_grid.py (rev 0)
+++ branches/v0_99_maint/doc/pyplots/whats_new_99_axes_grid.py 2009-08-06 14:55:54 UTC (rev 7400)
@@ -0,0 +1,47 @@
+import numpy as np
+import matplotlib.pyplot as plt
+from mpl_toolkits.axes_grid.axes_rgb import RGBAxes
+
+def get_demo_image():
+ # prepare image
+ delta = 0.5
+
+ extent = (-3,4,-4,3)
+ x = np.arange(-3.0, 4.001, delta)
+ y = np.arange(-4.0, 3.001, delta)
+ X, Y = np.meshgrid(x, y)
+ import matplotlib.mlab as mlab
+ Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
+ Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
+ Z = (Z1 - Z2) * 10
+
+ return Z, extent
+
+
+
+def get_rgb():
+ Z, extent = get_demo_image()
+
+ Z[Z<0] = 0.
+ Z = Z/Z.max()
+
+ R = Z[:13,:13]
+ G = Z[2:,2:]
+ B = Z[:13,2:]
+
+ return R, G, B
+
+
+fig = plt.figure(1)
+ax = RGBAxes(fig, [0.1, 0.1, 0.8, 0.8])
+
+r, g, b = get_rgb()
+kwargs = dict(origin="lower", interpolation="nearest")
+ax.imshow_rgb(r, g, b, **kwargs)
+
+ax.RGB.set_xlim(0., 9.5)
+ax.RGB.set_ylim(0.9, 10.6)
+
+
+plt.draw()
+plt.show()
Added: branches/v0_99_maint/doc/pyplots/whats_new_99_mplot3d.py
===================================================================
--- branches/v0_99_maint/doc/pyplots/whats_new_99_mplot3d.py (rev 0)
+++ branches/v0_99_maint/doc/pyplots/whats_new_99_mplot3d.py 2009-08-06 14:55:54 UTC (rev 7400)
@@ -0,0 +1,17 @@
+from mpl_toolkits.mplot3d import Axes3D
+from matplotlib import cm
+import pylab
+import random
+import numpy as np
+
+fig = pylab.figure()
+ax = Axes3D(fig)
+X = np.arange(-5, 5, 0.25)
+Y = np.arange(-5, 5, 0.25)
+X, Y = np.meshgrid(X, Y)
+R = np.sqrt(X**2 + Y**2)
+Z = np.sin(R)
+ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet)
+
+pylab.show()
+
Added: branches/v0_99_maint/doc/pyplots/whats_new_99_spines.py
===================================================================
--- branches/v0_99_maint/doc/pyplots/whats_new_99_spines.py (rev 0)
+++ branches/v0_99_maint/doc/pyplots/whats_new_99_spines.py 2009-08-06 14:55:54 UTC (rev 7400)
@@ -0,0 +1,47 @@
+import matplotlib.pyplot as plt
+import numpy as np
+from matplotlib.pyplot import show
+
+
+def adjust_spines(ax,spines):
+ for loc, spine in ax.spines.iteritems():
+ if loc in spines:
+ spine.set_position(('outward',10)) # outward by 10 points
+ else:
+ spine.set_color('none') # don't draw spine
+
+ # turn off ticks where there is no spine
+ if 'left' in spines:
+ ax.yaxis.set_ticks_position('left')
+ else:
+ # no yaxis ticks
+ ax.yaxis.set_ticks([])
+
+ if 'bottom' in spines:
+ ax.xaxis.set_ticks_position('bottom')
+ else:
+ # no xaxis ticks
+ ax.xaxis.set_ticks([])
+
+fig = plt.figure()
+
+x = np.linspace(0,2*np.pi,100)
+y = 2*np.sin(x)
+
+ax = fig.add_subplot(2,2,1)
+ax.plot(x,y)
+adjust_spines(ax,['left'])
+
+ax = fig.add_subplot(2,2,2)
+ax.plot(x,y)
+adjust_spines(ax,[])
+
+ax = fig.add_subplot(2,2,3)
+ax.plot(x,y)
+adjust_spines(ax,['left','bottom'])
+
+ax = fig.add_subplot(2,2,4)
+ax.plot(x,y)
+adjust_spines(ax,['bottom'])
+
+show()
Modified: branches/v0_99_maint/doc/users/whats_new.rst
===================================================================
--- branches/v0_99_maint/doc/users/whats_new.rst 2009-08-06 12:29:07 UTC (rev 7399)
+++ branches/v0_99_maint/doc/users/whats_new.rst 2009-08-06 14:55:54 UTC (rev 7400)
@@ -6,23 +6,57 @@
.. _whats-new-svn:
-What new in svn
-===============
+What new in matplotlib-0.99
+=============================
+.. _whats-new-mplot3d:
+
+mplot3d
+--------
+
+
+Reinier Heeres has ported John Porter's mplot3d over to the new
+matplotlib transformations framework, and it is now available as a
+toolkit mpl_toolkits.mplot3d. See the `examples
+<http://matplotlib.sourceforge.net/examples/mplot3d/index.html>`_ and
+:ref:`toolkit_mplot3d-tutorial`
+
+.. plot:: pyplots/whats_new_mplot3d.py
+
+.. _whats-new-axes-grid:
+
+axes grid toolkit
+-----------------
+
+Jae Joon has added a new toolkit to ease displaying multiple images in
+matplotlib, as well as some support for curvilinear grids to support
+the world coordinate system. See :ref:`axes_grid_users-guide-index`
+and `examples <http://matplotlib.sourceforge.net/examples/axes_grid/index.html>`_
+
+.. plot:: pyplots/whats_new_axes_grid.py
+
+.. _whats-new-spine:
+
Axis spine placement
--------------------
Andrew Straw has added the ability to place "axis spines" -- the lines
-that denote the data limits -- in various arbitrary locations. See
+that denote the data limits -- in various arbitrary locations. No
+longer are your axis lines constrained to be a simple rectangle around
+the figure -- you can turn on or off left, bottom, right and top, as
+well as "detach" the spine to offset it away from the data. See
+:ref:`pylab_examples-spine_placement_demo` and
:class:`matplotlib.spines.Spine`.
+.. plot:: pyplots/whats_new_99_spines.py
+
.. _whats-new-0-98-4:
What new in 0.98.4
==============================
It's been four months since the last matplotlib release, and there are
-a lot of new features and bug-fixes.
+a lot of new features and bug-fixes.
Thanks to Charlie Moad for testing and preparing the source release,
including binaries for OS X and Windows for python 2.4 and 2.5 (2.6
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|