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 e88957d

Browse filesBrowse files
authored
Merge pull request #8211 from NelleV/MEP12_text_labels_and_annotations
Mep12 text labels and annotations
2 parents bbc5357 + 48e608f commit e88957d
Copy full SHA for e88957d

File tree

Expand file treeCollapse file tree

2 files changed

+15
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+15
-3
lines changed

‎examples/text_labels_and_annotations/autowrap_demo.py

Copy file name to clipboardExpand all lines: examples/text_labels_and_annotations/autowrap_demo.py
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
"""
2-
Auto-wrapping text demo.
2+
==================
3+
Auto-wrapping text
4+
==================
5+
6+
Matplotlib can wrap text automatically, but if it's too long, the text will be
7+
displayed slightly outside of the boundaries of the axis anyways.
38
"""
9+
410
import matplotlib.pyplot as plt
511

612
fig = plt.figure()
@@ -12,7 +18,7 @@
1218
plt.text(6, 5, t, ha='left', rotation=15, wrap=True)
1319
plt.text(5, 5, t, ha='right', rotation=-15, wrap=True)
1420
plt.text(5, 10, t, fontsize=18, style='oblique', ha='center',
15-
va='top', wrap=True)
21+
va='top', wrap=True)
1622
plt.text(3, 4, t, family='serif', style='italic', ha='right', wrap=True)
1723
plt.text(-1, 0, t, ha='left', rotation=-15, wrap=True)
1824

‎examples/text_labels_and_annotations/text_demo_fontdict.py

Copy file name to clipboardExpand all lines: examples/text_labels_and_annotations/text_demo_fontdict.py
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
"""
2-
Demo using fontdict to control style of text and labels.
2+
=======================================================
3+
Controlling style of text and labels using a dictionary
4+
=======================================================
5+
6+
This example shows how to share parameters across many text objects and labels
7+
by creating a dictionary of options passed across several functions.
38
"""
9+
410
import numpy as np
511
import matplotlib.pyplot as plt
612

0 commit comments

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