Skip to content

Commit 5c7f765

Browse files
committed
Update example links
1 parent bb8ceab commit 5c7f765

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/misc/hyperlinks_sgskip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
fig = plt.figure()
2020
s = plt.scatter([1, 2, 3], [4, 5, 6])
21-
s.set_urls(['https://www.bbc.co.uk/news', 'https://www.google.com/', None])
21+
s.set_urls(['https://www.bbc.com/news', 'https://www.google.com/', None])
2222
fig.savefig('scatter.svg')
2323

2424
###############################################################################

lib/matplotlib/tests/test_backend_svg.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -286,17 +286,17 @@ def test_url():
286286

287287
# collections
288288
s = ax.scatter([1, 2, 3], [4, 5, 6])
289-
s.set_urls(['http://example.com/foo', 'http://example.com/bar', None])
289+
s.set_urls(['https://example.com/foo', 'https://example.com/bar', None])
290290

291291
# Line2D
292292
p, = plt.plot([1, 3], [6, 5])
293-
p.set_url('http://example.com/baz')
293+
p.set_url('https://example.com/baz')
294294

295295
b = BytesIO()
296296
fig.savefig(b, format='svg')
297297
b = b.getvalue()
298298
for v in [b'foo', b'bar', b'baz']:
299-
assert b'http://example.com/' + v in b
299+
assert b'https://example.com/' + v in b
300300

301301

302302
def test_url_tick(monkeypatch):
@@ -305,13 +305,13 @@ def test_url_tick(monkeypatch):
305305
fig1, ax = plt.subplots()
306306
ax.scatter([1, 2, 3], [4, 5, 6])
307307
for i, tick in enumerate(ax.yaxis.get_major_ticks()):
308-
tick.set_url(f'http://example.com/{i}')
308+
tick.set_url(f'https://example.com/{i}')
309309

310310
fig2, ax = plt.subplots()
311311
ax.scatter([1, 2, 3], [4, 5, 6])
312312
for i, tick in enumerate(ax.yaxis.get_major_ticks()):
313-
tick.label1.set_url(f'http://example.com/{i}')
314-
tick.label2.set_url(f'http://example.com/{i}')
313+
tick.label1.set_url(f'https://example.com/{i}')
314+
tick.label2.set_url(f'https://example.com/{i}')
315315

316316
b1 = BytesIO()
317317
fig1.savefig(b1, format='svg')
@@ -322,7 +322,7 @@ def test_url_tick(monkeypatch):
322322
b2 = b2.getvalue()
323323

324324
for i in range(len(ax.yaxis.get_major_ticks())):
325-
assert f'http://example.com/{i}'.encode('ascii') in b1
325+
assert f'https://example.com/{i}'.encode('ascii') in b1
326326
assert b1 == b2
327327

328328

0 commit comments

Comments
 (0)