|
From: <jd...@us...> - 2008-12-16 16:58:41
|
Revision: 6632
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6632&view=rev
Author: jdh2358
Date: 2008-12-16 16:58:37 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
added legend to markevery tests
Modified Paths:
--------------
trunk/matplotlib/unit/nose_tests.py
Modified: trunk/matplotlib/unit/nose_tests.py
===================================================================
--- trunk/matplotlib/unit/nose_tests.py 2008-12-16 16:54:10 UTC (rev 6631)
+++ trunk/matplotlib/unit/nose_tests.py 2008-12-16 16:58:37 UTC (rev 6632)
@@ -3,6 +3,7 @@
import nose, nose.tools as nt
import numpy.testing as nptest
+
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
@@ -20,20 +21,22 @@
# check marker only plot
fig = plt.figure()
ax = fig.add_subplot(111)
- ax.plot(x, y, 'o')
- ax.plot(x, y, 'd', markevery=None)
- ax.plot(x, y, 's', markevery=10)
- ax.plot(x, y, '+', markevery=(5, 20))
+ ax.plot(x, y, 'o', label='default')
+ ax.plot(x, y, 'd', markevery=None, label='mark all')
+ ax.plot(x, y, 's', markevery=10, label='mark every 10')
+ ax.plot(x, y, '+', markevery=(5, 20), label='mark every 5 starting at 10')
+ ax.legend()
fig.canvas.draw()
plt.close(fig)
# check line/marker combos
fig = plt.figure()
ax = fig.add_subplot(111)
- ax.plot(x, y, '-o')
- ax.plot(x, y, '-d', markevery=None)
- ax.plot(x, y, '-s', markevery=10)
- ax.plot(x, y, '-+', markevery=(5, 20))
+ ax.plot(x, y, '-o', label='default')
+ ax.plot(x, y, '-d', markevery=None, label='mark all')
+ ax.plot(x, y, '-s', markevery=10, label='mark every 10')
+ ax.plot(x, y, '-+', markevery=(5, 20), label='mark every 5 starting at 10')
+ ax.legend()
fig.canvas.draw()
plt.close(fig)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|