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

Skip to content

Commit 9fe22a1

Browse files
committed
Use HTML5 for webagg files
Without the doctype, the file is loaded in quirks mode, which is probably unwanted.
1 parent 98b1f82 commit 9fe22a1

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

examples/user_interfaces/embedding_webagg_sgskip.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,15 @@ def create_figure():
5252
# The following is the content of the web page. You would normally
5353
# generate this using some sort of template facility in your web
5454
# framework, but here we just use Python string formatting.
55-
html_content = """
56-
<html>
55+
html_content = """<!DOCTYPE html>
56+
<html lang="en">
5757
<head>
5858
<!-- TODO: There should be a way to include all of the required javascript
5959
and CSS so matplotlib can add to the set in the future if it
6060
needs to. -->
6161
<link rel="stylesheet" href="_static/css/page.css" type="text/css">
62-
<link rel="stylesheet" href="_static/css/boilerplate.css"
63-
type="text/css" />
64-
<link rel="stylesheet" href="_static/css/fbm.css" type="text/css" />
62+
<link rel="stylesheet" href="_static/css/boilerplate.css" type="text/css">
63+
<link rel="stylesheet" href="_static/css/fbm.css" type="text/css">
6564
<link rel="stylesheet" href="_static/css/mpl.css" type="text/css">
6665
<script src="mpl.js"></script>
6766

lib/matplotlib/backends/web_backend/all_figures.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
<html>
1+
<!DOCTYPE html>
2+
<html lang="en">
23
<head>
34
<link rel="stylesheet" href="{{ prefix }}/_static/css/page.css" type="text/css">
4-
<link rel="stylesheet" href="{{ prefix }}/_static/css/boilerplate.css" type="text/css" />
5-
<link rel="stylesheet" href="{{ prefix }}/_static/css/fbm.css" type="text/css" />
5+
<link rel="stylesheet" href="{{ prefix }}/_static/css/boilerplate.css" type="text/css">
6+
<link rel="stylesheet" href="{{ prefix }}/_static/css/fbm.css" type="text/css">
67
<link rel="stylesheet" href="{{ prefix }}/_static/css/mpl.css" type="text/css">
78
<script src="{{ prefix }}/_static/js/mpl_tornado.js"></script>
89
<script src="{{ prefix }}/js/mpl.js"></script>

lib/matplotlib/backends/web_backend/single_figure.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
<html>
1+
<!DOCTYPE html>
2+
<html lang="en">
23
<head>
34
<link rel="stylesheet" href="{{ prefix }}/_static/css/page.css" type="text/css">
4-
<link rel="stylesheet" href="{{ prefix }}/_static/css/boilerplate.css" type="text/css" />
5-
<link rel="stylesheet" href="{{ prefix }}/_static/css/fbm.css" type="text/css" />
5+
<link rel="stylesheet" href="{{ prefix }}/_static/css/boilerplate.css" type="text/css">
6+
<link rel="stylesheet" href="{{ prefix }}/_static/css/fbm.css" type="text/css">
67
<link rel="stylesheet" href="{{ prefix }}/_static/css/mpl.css" type="text/css">
78
<script src="{{ prefix }}/_static/js/mpl_tornado.js"></script>
89
<script src="{{ prefix }}/js/mpl.js"></script>

0 commit comments

Comments
 (0)