Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8ec4455

Browse filesBrowse files
committed
Merge remote-tracking branch 'matplotlib/v1.5.x' into v2.x
2 parents 0c1ae10 + 5ea0a5b commit 8ec4455
Copy full SHA for 8ec4455

File tree

Expand file treeCollapse file tree

10 files changed

+37
-10
lines changed
Filter options
Expand file treeCollapse file tree

10 files changed

+37
-10
lines changed

‎doc/_templates/index.html

Copy file name to clipboardExpand all lines: doc/_templates/index.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ <h1>John Hunter (1968-2012)</h1>
8989
If you have benefited from John's many contributions, please say
9090
thanks in the way that would matter most to him. Please consider
9191
making a donation to
92-
the <a href="http://numfocus.org/johnhunter/">John Hunter Memorial
93-
Fund</a>.</p>
92+
the <a href="http://numfocus.org/johnhunter/">John Hunter Technology
93+
Fellowship</a>.</p>
9494
</td>
9595
</tr>
9696
</table>

‎examples/misc/svg_filter_line.py

Copy file name to clipboardExpand all lines: examples/misc/svg_filter_line.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
ax.set_ylim(0., 1.)
5353

5454
# save the figure as a string in the svg format.
55-
from StringIO import StringIO
55+
from io import StringIO
5656
f = StringIO()
5757
plt.savefig(f, format="svg")
5858

‎examples/misc/svg_filter_pie.py

Copy file name to clipboardExpand all lines: examples/misc/svg_filter_pie.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343

4444
# save
45-
from StringIO import StringIO
45+
from io import StringIO
4646
f = StringIO()
4747
plt.savefig(f, format="svg")
4848

‎examples/tests/backend_driver.py

Copy file name to clipboardExpand all lines: examples/tests/backend_driver.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@
127127
'barcode_demo.py',
128128
'boxplot_demo.py',
129129
'broken_barh.py',
130-
'clippedline.py',
131130
'cohere_demo.py',
132131
'color_by_yvalue.py',
133132
'color_demo.py',

‎examples/user_interfaces/embedding_in_tk_canvas.py

Copy file name to clipboardExpand all lines: examples/user_interfaces/embedding_in_tk_canvas.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33

44
import matplotlib as mpl
55
import numpy as np
6-
import Tkinter as tk
6+
import sys
7+
if sys.version_info[0] < 3:
8+
import Tkinter as tk
9+
else:
10+
import tkinter as tk
711
import matplotlib.backends.tkagg as tkagg
812
from matplotlib.backends.backend_agg import FigureCanvasAgg
913

‎examples/user_interfaces/svg_histogram.py

Copy file name to clipboardExpand all lines: examples/user_interfaces/svg_histogram.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import numpy as np
3636
import matplotlib.pyplot as plt
3737
import xml.etree.ElementTree as ET
38-
from StringIO import StringIO
38+
from io import StringIO
3939
import json
4040

4141
plt.rcParams['svg.embed_char_paths'] = 'none'

‎examples/user_interfaces/svg_tooltip.py

Copy file name to clipboardExpand all lines: examples/user_interfaces/svg_tooltip.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import matplotlib.pyplot as plt
2626
import xml.etree.ElementTree as ET
27-
from StringIO import StringIO
27+
from io import StringIO
2828

2929
ET.register_namespace("", "http://www.w3.org/2000/svg")
3030

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+24-1Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from matplotlib.cbook import iterable, is_string_like
3939
from matplotlib.compat import subprocess
4040
from matplotlib import verbose
41-
from matplotlib import rcParams
41+
from matplotlib import rcParams, rcParamsDefault
4242

4343
# Process creation flag for subprocess to prevent it raising a terminal
4444
# window. See for example:
@@ -267,6 +267,8 @@ def isAvailable(cls):
267267
Check to see if a MovieWriter subclass is actually available by
268268
running the commandline tool.
269269
'''
270+
if not cls.bin_path():
271+
return False
270272
try:
271273
p = subprocess.Popen(cls.bin_path(),
272274
shell=False,
@@ -550,6 +552,27 @@ def delay(self):
550552
def output_args(self):
551553
return [self.outfile]
552554

555+
@classmethod
556+
def _init_from_registry(cls):
557+
if sys.platform != 'win32' or rcParams[cls.exec_key] != 'convert':
558+
return
559+
from matplotlib.externals.six.moves import winreg
560+
for flag in (0, winreg.KEY_WOW64_32KEY, winreg.KEY_WOW64_64KEY):
561+
try:
562+
hkey = winreg.OpenKeyEx(winreg.HKEY_LOCAL_MACHINE,
563+
'Software\\Imagemagick\\Current',
564+
0, winreg.KEY_QUERY_VALUE | flag)
565+
binpath = winreg.QueryValueEx(hkey, 'BinPath')[0]
566+
winreg.CloseKey(hkey)
567+
binpath += '\\convert.exe'
568+
break
569+
except Exception:
570+
binpath = ''
571+
rcParams[cls.exec_key] = rcParamsDefault[cls.exec_key] = binpath
572+
573+
574+
ImageMagickBase._init_from_registry()
575+
553576

554577
@writers.register('imagemagick')
555578
class ImageMagickWriter(MovieWriter, ImageMagickBase):

‎lib/matplotlib/backends/backend_qt5.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def _create_qApp():
137137
if display is None or not re.search(':\d', display):
138138
raise RuntimeError('Invalid DISPLAY variable')
139139

140-
qApp = QtWidgets.QApplication([six.text_type(" ")])
140+
qApp = QtWidgets.QApplication([str(" ")])
141141
qApp.lastWindowClosed.connect(qApp.quit)
142142
else:
143143
qApp = app

‎tests.py

Copy file name to clipboardExpand all lines: tests.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,6 @@ def run(extra_args):
6767
from matplotlib.testing import disable_internet
6868
disable_internet.turn_off_internet()
6969
extra_args.extend(['--eval-attr="not network"'])
70+
sys.argv.remove('--no-network')
7071

7172
run(extra_args)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.