Revision: 5251
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5251&view=rev
Author: efiring
Date: 2008-05-24 00:43:13 -0700 (Sat, 24 May 2008)
Log Message:
-----------
Forgot to add the example on last commit
Added Paths:
-----------
trunk/matplotlib/examples/api/color_cycle.py
Added: trunk/matplotlib/examples/api/color_cycle.py
===================================================================
--- trunk/matplotlib/examples/api/color_cycle.py
(rev 0)
+++ trunk/matplotlib/examples/api/color_cycle.py 2008-05-24 07:43:13 UTC
(rev 5251)
@@ -0,0 +1,28 @@
+"""
+Illustrate the API for changing the cycle of colors used
+when plotting multiple lines on a single Axes.
+"""
+
+import numpy as np
+import matplotlib.pyplot as plt
+import matplotlib as mpl
+
+yy = np.arange(24)
+yy.shape = 6,4
+
+mpl.rc('lines', linewidth=4)
+
+fig = plt.figure()
+mpl.axes.set_default_color_cycle(['r', 'g', 'b', 'c'])
+ax = fig.add_subplot(2,1,1)
+ax.plot(yy)
+ax.set_title('Changed default color cycle to rgbc')
+
+ax = fig.add_subplot(2,1,2)
+ax.set_color_cycle(['c', 'm', 'y', 'k'])
+ax.plot(yy)
+ax.set_title('This axes only, cycle is cmyk')
+
+plt.show()
+
+
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins