Skip to content

Commit 009073b

Browse files
committed
finish adding rainbow_text example, closes matplotlib#697
1 parent 0712e3a commit 009073b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

examples/text_labels_and_annotations/rainbow_text.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# -*- coding: utf-8 -*-
22
"""
3+
The example shows how to string together several text objects.
4+
5+
HISTORY
6+
-------
37
On the matplotlib-users list back in February 2012, Gökhan Sever asked the
48
following question:
59
@@ -14,7 +18,6 @@
1418
1519
Paul Ivanov responded with this answer:
1620
"""
17-
1821
import matplotlib.pyplot as plt
1922
from matplotlib import transforms
2023

@@ -48,6 +51,6 @@ def rainbow_text(x,y,ls,lc,**kw):
4851

4952

5053
plt.figure()
51-
rainbow_text(0.0,0.0,"all unicorns poop rainbows ! ! !".split(),
52-
['red', 'orange', 'brown', 'green', 'blue', 'purple', 'black'],
53-
size=30)
54+
rainbow_text(40, 540, "all unicorns poop rainbows ! ! !".split(),
55+
['red', 'cyan', 'brown', 'green', 'blue', 'purple', 'black'],
56+
size=40)

0 commit comments

Comments
 (0)