FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Test reorg by mdboom · Pull Request #74 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension .pdf  (2) .png  (2) .py  (2) .svg  (2) All 4 file types selected
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Next Next commit
Move auto_legend.py tests into regression test framework.
  • Loading branch information
mdboom committed Apr 4, 2011
commit f641d334fa46ef116d08d71f13481df6b13ca66d
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
1,071 changes: 1,071 additions & 0 deletions lib/matplotlib/tests/baseline_images/test_legend/legend_auto2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
29 changes: 29 additions & 0 deletions lib/matplotlib/tests/test_legend.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import numpy as np

from matplotlib.testing.decorators import image_comparison, knownfailureif
import matplotlib.pyplot as plt
from nose.tools import assert_raises
from numpy.testing import assert_array_equal

@image_comparison(baseline_images=['legend_auto1'])
def test_legend_auto1():
'Test automatic legend placement'
fig = plt.figure()
ax = fig.add_subplot(111)
x = np.arange(100)
ax.plot(x, 50-x, 'o', label='y=1')
ax.plot(x, x-50, 'o', label='y=-1')
ax.legend(loc=0)
fig.savefig('legend_auto1')

@image_comparison(baseline_images=['legend_auto2'])
def test_legend_auto2():
'Test automatic legend placement'
fig = plt.figure()
ax = fig.add_subplot(111)
x = np.arange(100)
b1 = ax.bar(x, x, color='m')
b2 = ax.bar(x, x[::-1], color='g')
ax.legend([b1[0], b2[0]], ['up', 'down'], loc=0)
fig.savefig('legend_auto2')

82 changes: 0 additions & 82 deletions unit/auto_legend.py

This file was deleted.


Back | FazBrowse Home | New Git URL