Mep12 text labels and annotations #8211

Merged
merged 4 commits into from Mar 8, 2017
@@ -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()
@@ -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)
@@ -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