Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

bugfix for matplotlib/ticker.py (python 3.3) #1991

Merged
merged 1 commit into from

2 participants

@2sn

(ref. current git version of mpl)

when I plot something with huge coordinate values, > 1E35, I get an error

File "matplotlib/ticker.py", line 550, in set_format
if np.abs(locs - np.round(locs, decimals=sigfigs)).max() < thresh:
File "/usr/lib64/python3.3/site-packages/numpy/core/fromnumeric.py", line 2402, in round

return round(decimals, out)
AttributeError: 'float' object has no attribute 'rint'

The problem is that the array becomes NoneType

ipdb> a
a = array([0.0, 1.0, 2.0, 3.0, 4.0, 5.0], dtype=object)
decimals = 3
out = None

because the representation in

matplotlib/ticker.py overflows

10 ** self.orderOfMagnitude

what can be done as regular integer, hence

locs = (np.asarray(_locs) - self.offset) / 10 ** self.orderOfMagnitude

returns dtype=object

The solution is the following patch (just make "10" float --- "10."):

--- matplotlib/ticker.py~ 2013-05-10 16:43:44.000000000 +1000
+++ matplotlib/ticker.py 2013-05-10 17:44:35.385288785 +1000
@@ -536,7 +536,7 @@
_locs = list(self.locs) + [vmin, vmax]
else:
_locs = self.locs

  • locs = (np.asarray(_locs) - self.offset) / 10 ** self.orderOfMagnitude
  • locs = (np.asarray(_locs) - self.offset) / 10. ** self.orderOfMagnitude loc_range = np.ptp(locs) if len(self.locs) < 2: # We needed the end points only for the loc_range calculation.

I hope you can change that.

-Alexander

@mdboom
Owner

Duplicate of #1828.

@mdboom
Owner

@2sn: Thanks for finding the solution!

@2sn
@mdboom
Owner

No worries about not finding it -- I'm just glad to have a solution.

Merging.

@mdboom mdboom merged commit dadb035 into matplotlib:v1.2.x
@mdboom mdboom deleted the mdboom:ticker-overflow branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 10, 2013
  1. @mdboom
This page is out of date. Refresh to see the latest.
View
BIN  lib/matplotlib/tests/baseline_images/test_axes/formatter_large_small.pdf
Binary file not shown
View
BIN  lib/matplotlib/tests/baseline_images/test_axes/formatter_large_small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
259 lib/matplotlib/tests/baseline_images/test_axes/formatter_large_small.svg
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<!-- Created with matplotlib (http://matplotlib.sourceforge.net/) -->
+<!-- Created with matplotlib (http://matplotlib.org/) -->
<svg height="432pt" version="1.1" viewBox="0 0 576 432" width="576pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<style type="text/css">
@@ -39,26 +39,40 @@ L444 43.2" style="fill:none;stroke:#0000ff;"/>
<defs>
<path d="
M0 0
-L0 -4" id="mcb557df647" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
+L0 -4" id="m0012dd4eef" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
</defs>
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0000305176" xlink:href="#mcb557df647" y="388.8"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0000305176" xlink:href="#m0012dd4eef" y="388.8"/>
</g>
</g>
<g id="line2d_3">
<defs>
<path d="
M0 0
-L0 4" id="mdad270ee8e" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
+L0 4" id="m476344969c" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
</defs>
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0000305176" xlink:href="#mdad270ee8e" y="43.2"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0000305176" xlink:href="#m476344969c" y="43.2"/>
</g>
</g>
<g id="text_1">
<!-- 1.0 -->
<defs>
<path d="
+M12.4062 8.29688
+L28.5156 8.29688
+L28.5156 63.9219
+L10.9844 60.4062
+L10.9844 69.3906
+L28.4219 72.9062
+L38.2812 72.9062
+L38.2812 8.29688
+L54.3906 8.29688
+L54.3906 0
+L12.4062 0
+z
+" id="BitstreamVeraSans-Roman-31"/>
+ <path d="
M31.7812 66.4062
Q24.1719 66.4062 20.3281 58.9062
Q16.5 51.4219 16.5 36.375
@@ -78,20 +92,6 @@ Q6.59375 17.9688 6.59375 36.375
Q6.59375 54.8281 13.0625 64.5156
Q19.5312 74.2188 31.7812 74.2188" id="BitstreamVeraSans-Roman-30"/>
<path d="
-M12.4062 8.29688
-L28.5156 8.29688
-L28.5156 63.9219
-L10.9844 60.4062
-L10.9844 69.3906
-L28.4219 72.9062
-L38.2812 72.9062
-L38.2812 8.29688
-L54.3906 8.29688
-L54.3906 0
-L12.4062 0
-z
-" id="BitstreamVeraSans-Roman-31"/>
- <path d="
M10.6875 12.4062
L21 12.4062
L21 0
@@ -109,12 +109,12 @@ z
<g id="xtick_2">
<g id="line2d_4">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="146.400024414" xlink:href="#mcb557df647" y="388.8"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="146.400024414" xlink:href="#m0012dd4eef" y="388.8"/>
</g>
</g>
<g id="line2d_5">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="146.400024414" xlink:href="#mdad270ee8e" y="43.2"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="146.400024414" xlink:href="#m476344969c" y="43.2"/>
</g>
</g>
<g id="text_2">
@@ -154,12 +154,12 @@ Q31.1094 20.4531 19.1875 8.29688" id="BitstreamVeraSans-Roman-32"/>
<g id="xtick_3">
<g id="line2d_6">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="220.800048828" xlink:href="#mcb557df647" y="388.8"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="220.800048828" xlink:href="#m0012dd4eef" y="388.8"/>
</g>
</g>
<g id="line2d_7">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="220.800048828" xlink:href="#mdad270ee8e" y="43.2"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="220.800048828" xlink:href="#m476344969c" y="43.2"/>
</g>
</g>
<g id="text_3">
@@ -195,12 +195,12 @@ z
<g id="xtick_4">
<g id="line2d_8">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="295.200042725" xlink:href="#mcb557df647" y="388.8"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="295.200042725" xlink:href="#m0012dd4eef" y="388.8"/>
</g>
</g>
<g id="line2d_9">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="295.200042725" xlink:href="#mdad270ee8e" y="43.2"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="295.200042725" xlink:href="#m476344969c" y="43.2"/>
</g>
</g>
<g id="text_4">
@@ -245,12 +245,12 @@ Q48.4844 72.75 52.5938 71.2969" id="BitstreamVeraSans-Roman-36"/>
<g id="xtick_5">
<g id="line2d_10">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="369.600036621" xlink:href="#mcb557df647" y="388.8"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="369.600036621" xlink:href="#m0012dd4eef" y="388.8"/>
</g>
</g>
<g id="line2d_11">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="369.600036621" xlink:href="#mdad270ee8e" y="43.2"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="369.600036621" xlink:href="#m476344969c" y="43.2"/>
</g>
</g>
<g id="text_5">
@@ -303,12 +303,12 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
<g id="xtick_6">
<g id="line2d_12">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="444.000061035" xlink:href="#mcb557df647" y="388.8"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="444.000061035" xlink:href="#m0012dd4eef" y="388.8"/>
</g>
</g>
<g id="line2d_13">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="444.000061035" xlink:href="#mdad270ee8e" y="43.2"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="444.000061035" xlink:href="#m476344969c" y="43.2"/>
</g>
</g>
<g id="text_6">
@@ -323,12 +323,12 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
<g id="xtick_7">
<g id="line2d_14">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.400024414" xlink:href="#mcb557df647" y="388.8"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.400024414" xlink:href="#m0012dd4eef" y="388.8"/>
</g>
</g>
<g id="line2d_15">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.400024414" xlink:href="#mdad270ee8e" y="43.2"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.400024414" xlink:href="#m476344969c" y="43.2"/>
</g>
</g>
<g id="text_7">
@@ -344,6 +344,46 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
<!-- 1e−9+5e−1 -->
<defs>
<path d="
+M46 62.7031
+L46 35.5
+L73.1875 35.5
+L73.1875 27.2031
+L46 27.2031
+L46 0
+L37.7969 0
+L37.7969 27.2031
+L10.5938 27.2031
+L10.5938 35.5
+L37.7969 35.5
+L37.7969 62.7031
+z
+" id="BitstreamVeraSans-Roman-2b"/>
+ <path d="
+M10.7969 72.9062
+L49.5156 72.9062
+L49.5156 64.5938
+L19.8281 64.5938
+L19.8281 46.7344
+Q21.9688 47.4688 24.1094 47.8281
+Q26.2656 48.1875 28.4219 48.1875
+Q40.625 48.1875 47.75 41.5
+Q54.8906 34.8125 54.8906 23.3906
+Q54.8906 11.625 47.5625 5.09375
+Q40.2344 -1.42188 26.9062 -1.42188
+Q22.3125 -1.42188 17.5469 -0.640625
+Q12.7969 0.140625 7.71875 1.70312
+L7.71875 11.625
+Q12.1094 9.23438 16.7969 8.0625
+Q21.4844 6.89062 26.7031 6.89062
+Q35.1562 6.89062 40.0781 11.3281
+Q45.0156 15.7656 45.0156 23.3906
+Q45.0156 31 40.0781 35.4375
+Q35.1562 39.8906 26.7031 39.8906
+Q22.75 39.8906 18.8125 39.0156
+Q14.8906 38.1406 10.7969 36.2812
+z
+" id="BitstreamVeraSans-Roman-35"/>
+ <path d="
M56.2031 29.5938
L56.2031 25.2031
L14.8906 25.2031
@@ -368,13 +408,6 @@ Q15.875 39.8906 15.1875 32.1719
z
" id="BitstreamVeraSans-Roman-65"/>
<path d="
-M10.5938 35.5
-L73.1875 35.5
-L73.1875 27.2031
-L10.5938 27.2031
-z
-" id="BitstreamVeraSans-Roman-2212"/>
- <path d="
M10.9844 1.51562
L10.9844 10.5
Q14.7031 8.73438 18.5 7.8125
@@ -403,45 +436,12 @@ Q16.2188 57.2812 16.2188 49.4219
Q16.2188 41.5 20.0938 36.9531
Q23.9688 32.4219 30.6094 32.4219" id="BitstreamVeraSans-Roman-39"/>
<path d="
-M46 62.7031
-L46 35.5
+M10.5938 35.5
L73.1875 35.5
L73.1875 27.2031
-L46 27.2031
-L46 0
-L37.7969 0
-L37.7969 27.2031
L10.5938 27.2031
-L10.5938 35.5
-L37.7969 35.5
-L37.7969 62.7031
-z
-" id="BitstreamVeraSans-Roman-2b"/>
- <path d="
-M10.7969 72.9062
-L49.5156 72.9062
-L49.5156 64.5938
-L19.8281 64.5938
-L19.8281 46.7344
-Q21.9688 47.4688 24.1094 47.8281
-Q26.2656 48.1875 28.4219 48.1875
-Q40.625 48.1875 47.75 41.5
-Q54.8906 34.8125 54.8906 23.3906
-Q54.8906 11.625 47.5625 5.09375
-Q40.2344 -1.42188 26.9062 -1.42188
-Q22.3125 -1.42188 17.5469 -0.640625
-Q12.7969 0.140625 7.71875 1.70312
-L7.71875 11.625
-Q12.1094 9.23438 16.7969 8.0625
-Q21.4844 6.89062 26.7031 6.89062
-Q35.1562 6.89062 40.0781 11.3281
-Q45.0156 15.7656 45.0156 23.3906
-Q45.0156 31 40.0781 35.4375
-Q35.1562 39.8906 26.7031 39.8906
-Q22.75 39.8906 18.8125 39.0156
-Q14.8906 38.1406 10.7969 36.2812
z
-" id="BitstreamVeraSans-Roman-35"/>
+" id="BitstreamVeraSans-Roman-2212"/>
</defs>
<g transform="translate(445.351875 413.783125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-31"/>
@@ -462,169 +462,166 @@ z
<defs>
<path d="
M0 0
-L4 0" id="mc8fcea1516" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
+L4 0" id="me8a85f7bf6" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
</defs>
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="388.799987793"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#me8a85f7bf6" y="388.8"/>
</g>
</g>
<g id="line2d_17">
<defs>
<path d="
M0 0
-L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
+L-4 0" id="m1a32005dea" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
</defs>
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="388.799987793"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m1a32005dea" y="388.8"/>
</g>
</g>
<g id="text_9">
- <!-- 0.0 -->
- <g transform="translate(50.504375 393.167800293)scale(0.12 -0.12)">
- <use xlink:href="#BitstreamVeraSans-Roman-30"/>
+ <!-- 1.00 -->
+ <g transform="translate(43.39625 393.1678125)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
+ <use x="159.033203125" xlink:href="#BitstreamVeraSans-Roman-30"/>
</g>
</g>
</g>
<g id="ytick_2">
<g id="line2d_18">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="319.679992676"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#me8a85f7bf6" y="319.68"/>
</g>
</g>
<g id="line2d_19">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="319.679992676"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m1a32005dea" y="319.68"/>
</g>
</g>
<g id="text_10">
- <!-- 0.2 -->
- <g transform="translate(50.909375 324.047805176)scale(0.12 -0.12)">
- <use xlink:href="#BitstreamVeraSans-Roman-30"/>
+ <!-- 1.02 -->
+ <g transform="translate(43.80125 324.0478125)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
- <use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-32"/>
+ <use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
+ <use x="159.033203125" xlink:href="#BitstreamVeraSans-Roman-32"/>
</g>
</g>
</g>
<g id="ytick_3">
<g id="line2d_20">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="250.559997559"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#me8a85f7bf6" y="250.56"/>
</g>
</g>
<g id="line2d_21">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="250.559997559"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m1a32005dea" y="250.56"/>
</g>
</g>
<g id="text_11">
- <!-- 0.4 -->
- <g transform="translate(50.380625 254.927810059)scale(0.12 -0.12)">
- <use xlink:href="#BitstreamVeraSans-Roman-30"/>
+ <!-- 1.04 -->
+ <g transform="translate(43.2725 254.9278125)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
- <use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-34"/>
+ <use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
+ <use x="159.033203125" xlink:href="#BitstreamVeraSans-Roman-34"/>
</g>
</g>
</g>
<g id="ytick_4">
<g id="line2d_22">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="181.439971924"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#me8a85f7bf6" y="181.44"/>
</g>
</g>
<g id="line2d_23">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="181.439971924"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m1a32005dea" y="181.44"/>
</g>
</g>
<g id="text_12">
- <!-- 0.6 -->
- <g transform="translate(50.463125 185.807784424)scale(0.12 -0.12)">
- <use xlink:href="#BitstreamVeraSans-Roman-30"/>
+ <!-- 1.06 -->
+ <g transform="translate(43.355 185.8078125)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
- <use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-36"/>
+ <use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
+ <use x="159.033203125" xlink:href="#BitstreamVeraSans-Roman-36"/>
</g>
</g>
</g>
<g id="ytick_5">
<g id="line2d_24">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="112.319976807"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#me8a85f7bf6" y="112.32"/>
</g>
</g>
<g id="line2d_25">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="112.319976807"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m1a32005dea" y="112.32"/>
</g>
</g>
<g id="text_13">
- <!-- 0.8 -->
- <g transform="translate(50.52875 116.687789307)scale(0.12 -0.12)">
- <use xlink:href="#BitstreamVeraSans-Roman-30"/>
+ <!-- 1.08 -->
+ <g transform="translate(43.420625 116.6878125)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
- <use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-38"/>
+ <use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
+ <use x="159.033203125" xlink:href="#BitstreamVeraSans-Roman-38"/>
</g>
</g>
</g>
<g id="ytick_6">
<g id="line2d_26">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="43.1999816895"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#me8a85f7bf6" y="43.2"/>
</g>
</g>
<g id="line2d_27">
<g>
- <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="43.1999816895"/>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m1a32005dea" y="43.2"/>
</g>
</g>
<g id="text_14">
- <!-- 1.0 -->
- <g transform="translate(51.03125 47.5677941895)scale(0.12 -0.12)">
+ <!-- 1.10 -->
+ <g transform="translate(43.39625 47.5678125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-31"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
- <use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
+ <use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-31"/>
+ <use x="159.033203125" xlink:href="#BitstreamVeraSans-Roman-30"/>
</g>
</g>
</g>
<g id="text_15">
- <!-- +5.00000001e8 -->
+ <!-- 1e64 -->
<g transform="translate(72.0 40.2)scale(0.12 -0.12)">
- <use xlink:href="#BitstreamVeraSans-Roman-2b"/>
- <use x="83.7890625" xlink:href="#BitstreamVeraSans-Roman-35"/>
- <use x="147.412109375" xlink:href="#BitstreamVeraSans-Roman-2e"/>
- <use x="179.19921875" xlink:href="#BitstreamVeraSans-Roman-30"/>
- <use x="242.822265625" xlink:href="#BitstreamVeraSans-Roman-30"/>
- <use x="306.4453125" xlink:href="#BitstreamVeraSans-Roman-30"/>
- <use x="370.068359375" xlink:href="#BitstreamVeraSans-Roman-30"/>
- <use x="433.69140625" xlink:href="#BitstreamVeraSans-Roman-30"/>
- <use x="497.314453125" xlink:href="#BitstreamVeraSans-Roman-30"/>
- <use x="560.9375" xlink:href="#BitstreamVeraSans-Roman-30"/>
- <use x="624.560546875" xlink:href="#BitstreamVeraSans-Roman-31"/>
- <use x="688.18359375" xlink:href="#BitstreamVeraSans-Roman-65"/>
- <use x="749.70703125" xlink:href="#BitstreamVeraSans-Roman-38"/>
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
+ <use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-65"/>
+ <use x="125.146484375" xlink:href="#BitstreamVeraSans-Roman-36"/>
+ <use x="188.76953125" xlink:href="#BitstreamVeraSans-Roman-34"/>
</g>
</g>
</g>
<g id="patch_3">
<path d="
-M72 43.2
-L518.4 43.2" style="fill:none;stroke:#000000;"/>
+M72 388.8
+L72 43.2" style="fill:none;stroke:#000000;"/>
</g>
<g id="patch_4">
<path d="
-M518.4 388.8
-L518.4 43.2" style="fill:none;stroke:#000000;"/>
+M72 388.8
+L518.4 388.8" style="fill:none;stroke:#000000;"/>
</g>
<g id="patch_5">
<path d="
-M72 388.8
-L518.4 388.8" style="fill:none;stroke:#000000;"/>
+M518.4 388.8
+L518.4 43.2" style="fill:none;stroke:#000000;"/>
</g>
<g id="patch_6">
<path d="
-M72 388.8
-L72 43.2" style="fill:none;stroke:#000000;"/>
+M72 43.2
+L518.4 43.2" style="fill:none;stroke:#000000;"/>
</g>
</g>
</g>
View
2  lib/matplotlib/tests/test_axes.py
@@ -59,7 +59,7 @@ def test_formatter_large_small():
# github issue #617, pull #619
fig, ax = plt.subplots(1)
x = [0.500000001, 0.500000002]
- y = [500000001, 500000002]
+ y = [1e64, 1.1e64]
ax.plot(x, y)
@image_comparison(baseline_images=["twin_axis_locaters_formatters"])
View
4 lib/matplotlib/ticker.py
@@ -536,7 +536,7 @@ def _set_format(self, vmin, vmax):
_locs = list(self.locs) + [vmin, vmax]
else:
_locs = self.locs
- locs = (np.asarray(_locs) - self.offset) / 10 ** self.orderOfMagnitude
+ locs = (np.asarray(_locs) - self.offset) / 10. ** self.orderOfMagnitude
loc_range = np.ptp(locs)
if len(self.locs) < 2:
# We needed the end points only for the loc_range calculation.
@@ -559,7 +559,7 @@ def _set_format(self, vmin, vmax):
self.format = '$\mathdefault{%s}$' % self.format
def pprint_val(self, x):
- xp = (x - self.offset) / (10 ** self.orderOfMagnitude)
+ xp = (x - self.offset) / (10. ** self.orderOfMagnitude)
if np.absolute(xp) < 1e-8:
xp = 0
if self._useLocale:
Something went wrong with that request. Please try again.