|
From: <ef...@us...> - 2010-04-03 23:22:55
|
Revision: 8220
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8220&view=rev
Author: efiring
Date: 2010-04-03 23:22:48 +0000 (Sat, 03 Apr 2010)
Log Message:
-----------
Update docs, examples, for new color kwarg in hist.
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/doc/api/api_changes.rst
trunk/matplotlib/examples/pylab_examples/histogram_demo_extended.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2010-04-03 07:18:18 UTC (rev 8219)
+++ trunk/matplotlib/CHANGELOG 2010-04-03 23:22:48 UTC (rev 8220)
@@ -1,7 +1,10 @@
-2010-03-24 refactor colorbar code so that no cla() is necessary when
+2010-04-03 Added color kwarg to Axes.hist(), based on work by
+ Jeff Klukas. - EF
+
+2010-03-24 refactor colorbar code so that no cla() is necessary when
mappable is changed. -JJL
-2010-03-22 fix incorrect rubber band during the zoom mode when mouse
+2010-03-22 fix incorrect rubber band during the zoom mode when mouse
leaves the axes. -JJL
2010-03-21 x/y key during the zoom mode only changes the x/y limits. -JJL
Modified: trunk/matplotlib/doc/api/api_changes.rst
===================================================================
--- trunk/matplotlib/doc/api/api_changes.rst 2010-04-03 07:18:18 UTC (rev 8219)
+++ trunk/matplotlib/doc/api/api_changes.rst 2010-04-03 23:22:48 UTC (rev 8220)
@@ -10,6 +10,9 @@
Changes beyond 0.99.x
=====================
+* The :meth:`matplotlib.axes.Axes.hist` *color* kwarg now accepts
+ a sequence of color specs to match a sequence of datasets.
+
* The :class:'~matplotlib.collections.EllipseCollection' has been
changed in two ways:
@@ -19,7 +22,7 @@
+ The *height* and *width* kwargs have been changed to specify
the height and width, again for consistency with
- :class:'~matplotlib.patches.Ellipse`, and to better match
+ :class:`~matplotlib.patches.Ellipse`, and to better match
their names; previously they specified the half-height and
half-width.
Modified: trunk/matplotlib/examples/pylab_examples/histogram_demo_extended.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/histogram_demo_extended.py 2010-04-03 07:18:18 UTC (rev 8219)
+++ trunk/matplotlib/examples/pylab_examples/histogram_demo_extended.py 2010-04-03 23:22:48 UTC (rev 8220)
@@ -63,13 +63,18 @@
#
# histogram has the ability to plot multiple data in parallel ...
+# Note the new color kwarg, used to override the default, which
+# uses the line color cycle.
#
P.figure()
# create a new data-set
x = mu + sigma*P.randn(1000,3)
-n, bins, patches = P.hist(x, 10, normed=1, histtype='bar')
+n, bins, patches = P.hist(x, 10, normed=1, histtype='bar',
+ color=['crimson', 'burlywood', 'chartreuse'],
+ label=['Crimson', 'Burlywood', 'Chartreuse'])
+P.legend()
#
# ... or we can stack the data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|