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 1af7495

Browse filesBrowse files
committed
Link rcParams role to docs
1 parent 341070a commit 1af7495
Copy full SHA for 1af7495

File tree

Expand file treeCollapse file tree

2 files changed

+12
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-5
lines changed

‎doc/_static/mpl.css

Copy file name to clipboardExpand all lines: doc/_static/mpl.css
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ a {
2323
text-decoration: none;
2424
}
2525

26+
a:hover {
27+
color: #2491CF;
28+
}
29+
2630
div.highlight-python a {
2731
color: #CA7900;
2832
}
@@ -35,10 +39,6 @@ strong {
3539
font-weight: strong;
3640
}
3741

38-
a:hover {
39-
color: #2491CF;
40-
}
41-
4242
pre {
4343
font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
4444
font-size: 0.90em;

‎doc/sphinxext/custom_roles.py

Copy file name to clipboardExpand all lines: doc/sphinxext/custom_roles.py
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33

44
def rcparam_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
55
rendered = nodes.Text('rcParams["{}"]'.format(text))
6-
return [nodes.literal(rawtext, rendered)], []
6+
7+
rel_source = inliner.document.attributes['source'].split('/doc/', 1)[1]
8+
levels = rel_source.count('/')
9+
refuri = ('../' * levels +
10+
'tutorials/introductory/customizing.html#matplotlib-rcparams')
11+
12+
ref = nodes.reference(rawtext, rendered, refuri=refuri)
13+
return [nodes.literal('', '', ref)], []
714

815

916
def setup(app):

0 commit comments

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