Skip to content

Add explanatory comment to annotation box example #13163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2019
Merged
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
29 changes: 27 additions & 2 deletions examples/text_labels_and_annotations/demo_annotation_box.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
"""
===================
"""===================
Demo Annotation Box
===================

The AnnotationBbox Artist creates an annotation using an OffsetBox. This
example demonstrates three different OffsetBoxes: TextArea, DrawingArea and
OffsetImage. AnnotationBbox gives more fine-grained control than using the axes
method annotate.

"""

import matplotlib.pyplot as plt
import numpy as np

Expand Down Expand Up @@ -95,3 +100,23 @@
ax.set_ylim(0, 1)

plt.show()

#############################################################################
#
# ------------
#
# References
# """"""""""
#
# The use of the following functions, methods and classes is shown in this
# example:

Circle
TextArea
DrawingArea
OffsetImage
AnnotationBbox
get_sample_data
plt.subplots
plt.imread
plt.show