Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d399f25

Browse files
committed
Merge remote-tracking branch 'matplotlib/v1.5.x' into v2.x
2 parents 80be853 + c4825a3 commit d399f25

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

examples/shapes_and_collections/artist_reference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def label(xy, text):
8484
grid[7] - [0.025, 0.05], 0.05, 0.1,
8585
boxstyle=mpatches.BoxStyle("Round", pad=0.02))
8686
patches.append(fancybox)
87-
label(grid[7], "FancyBoxPatch")
87+
label(grid[7], "FancyBboxPatch")
8888

8989
# add a line
9090
x, y = np.array([[-0.06, 0.0, 0.1], [0.05, -0.05, 0.05]])

lib/matplotlib/dates.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,8 @@ class AutoDateFormatter(ticker.Formatter):
642642
dictionary by doing::
643643
644644
645-
>>> formatter = AutoDateFormatter()
645+
>>> locator = AutoDateLocator()
646+
>>> formatter = AutoDateFormatter(locator)
646647
>>> formatter.scaled[1/(24.*60.)] = '%M:%S' # only show min and sec
647648
648649
A custom :class:`~matplotlib.ticker.FuncFormatter` can also be used.

lib/matplotlib/patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,7 @@ def register(klass, name, style):
18791879
class BoxStyle(_Style):
18801880
"""
18811881
:class:`BoxStyle` is a container class which defines several
1882-
boxstyle classes, which are used for :class:`FancyBoxPatch`.
1882+
boxstyle classes, which are used for :class:`FancyBboxPatch`.
18831883
18841884
A style object can be created as::
18851885

lib/matplotlib/testing/compare.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ def crop_to_same(actual_path, actual_image, expected_path, expected_image):
242242

243243
def calculate_rms(expectedImage, actualImage):
244244
"Calculate the per-pixel errors, then compute the root mean square error."
245+
if expectedImage.shape != actualImage.shape:
246+
raise ImageComparisonFailure(
247+
"image sizes do not match expected size: {0} "
248+
"actual size {1}".format(expectedImage.shape, actualImage.shape))
249+
245250
num_values = np.prod(expectedImage.shape)
246251
abs_diff_image = abs(expectedImage - actualImage)
247252

0 commit comments

Comments
 (0)