Revision: 6885
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6885&view=rev
Author: ryanmay
Date: 2009-02-05 18:00:52 +0000 (Thu, 05 Feb 2009)
Log Message:
-----------
Merged revisions 6883-6884 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6883 | ryanmay | 2009-02-05 11:48:37 -0600 (Thu, 05 Feb 2009) | 1 line
Backport doc typo fixes from trunk.
........
r6884 | ryanmay | 2009-02-05 11:55:51 -0600 (Thu, 05 Feb 2009) | 1 line
Add an example that displays all of the colormaps available. This is based
on code in the scipy.org cookbook. This should make a nice addition to the
gallery.
........
Added Paths:
-----------
trunk/matplotlib/examples/pylab_examples/show_colormaps.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6873
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6884
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
-
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873
+
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884
Copied: trunk/matplotlib/examples/pylab_examples/show_colormaps.py (from rev
6884, branches/v0_98_5_maint/examples/pylab_examples/show_colormaps.py)
===================================================================
--- trunk/matplotlib/examples/pylab_examples/show_colormaps.py
(rev 0)
+++ trunk/matplotlib/examples/pylab_examples/show_colormaps.py 2009-02-05
18:00:52 UTC (rev 6885)
@@ -0,0 +1,25 @@
+# This example comes from the Cookbook on www.scipy.org. According to the
+# history, Andrew Straw did the conversion from an old page, but it is
+# unclear who the original author is.
+import numpy as np
+import matplotlib.pyplot as plt
+
+a = np.linspace(0, 1, 256).reshape(1,-1)
+a = np.vstack((a,a))
+
+# Get a list of the colormaps in matplotlib. Ignore the ones that end with
+# '_r' because these are simply reversed versions of ones that don't end
+# with '_r'
+maps = sorted(m for m in plt.cm.datad if not m.endswith("_r"))
+nmaps = len(maps) + 1
+
+fig = plt.figure(figsize=(5,10))
+fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99)
+for i,m in enumerate(maps):
+ ax = plt.subplot(nmaps, 1, i+1)
+ plt.axis("off")
+ plt.imshow(a, aspect='auto', cmap=plt.get_cmap(m), origin='lower')
+ pos = list(ax.get_position().bounds)
+ fig.text(pos[0] - 0.01, pos[1], m, fontsize=10,
horizontalalignment='right')
+
+plt.show()
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins