Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions examples/text_labels_and_annotations/autowrap_demo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
"""
Auto-wrapping text demo.
==================
Auto-wrapping text
==================

Matplotlib can wrap text automatically, but if it's too long, the text will be
displayed slightly outside of the boundaries of the axis anyways.
"""

import matplotlib.pyplot as plt

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

Expand Down
8 changes: 7 additions & 1 deletion examples/text_labels_and_annotations/text_demo_fontdict.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
"""
Demo using fontdict to control style of text and labels.
=======================================================
Controlling style of text and labels using a dictionary
=======================================================

This example shows how to share parameters across many text objects and labels
by creating a dictionary of options passed across several functions.
"""

import numpy as np
import matplotlib.pyplot as plt

Expand Down