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

Skip to content

Commit b33a031

Browse files
committed
Minor fixes to get the doc builds working.
1 parent 9db5b2b commit b33a031

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

examples/pylab_examples/animation_demo.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,5 @@
2323
z = z + 2
2424
p.set_data(z)
2525

26-
print "step", i
26+
print("step", i)
2727
plt.pause(0.5)
28-
29-
30-

examples/pylab_examples/mathtext_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
r"$\gamma = \frac{x=\frac{6}{8}}{y} \delta$",
4141
r'$\limsup_{x\to\infty}$',
4242
r'$\oint^\infty_0$',
43-
r"$f^\prime$",
43+
r"$f^'$",
4444
r'$\frac{x_2888}{y}$',
4545
r"$\sqrt[3]{\frac{X_2}{Y}}=5$",
4646
r"$\sqrt[5]{\prod^\frac{x}{2\pi^2}_\infty}$",

examples/pylab_examples/stix_fonts_demo.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
if sys.maxunicode > 0xffff:
2121
s = r'Direct Unicode: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
22-
stests.append(
23-
unicode(s, encoding="unicode_escape")
24-
)
2522

2623
from pylab import *
2724

lib/matplotlib/backends/backend_pdf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,11 +1275,15 @@ def writePathCollectionTemplates(self):
12751275
for (name, path, trans, ob, joinstyle, capstyle, padding) in self.paths:
12761276
pathops = self.pathOperations(path, trans, simplify=False)
12771277
bbox = path.get_extents(trans)
1278-
bbox = bbox.padded(padding)
1278+
if not np.all(np.isfinite(bbox.extents)):
1279+
extents = [0, 0, 0, 0]
1280+
else:
1281+
bbox = bbox.padded(padding)
1282+
extents = list(bbox.extents)
12791283
self.beginStream(
12801284
ob.id, None,
12811285
{'Type': Name('XObject'), 'Subtype': Name('Form'),
1282-
'BBox': list(bbox.extents)})
1286+
'BBox': extents})
12831287
self.output(GraphicsContextPdf.joinstyles[joinstyle], Op.setlinejoin)
12841288
self.output(GraphicsContextPdf.capstyles[capstyle], Op.setlinecap)
12851289
self.output(*pathops)

0 commit comments

Comments
 (0)