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 a4e7ddd

Browse filesBrowse files
committed
TST: add test for first draw having correct annotation position
1 parent c720045 commit a4e7ddd
Copy full SHA for a4e7ddd

File tree

Expand file treeCollapse file tree

2 files changed

+17
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+17
-0
lines changed
Open diff view settings
Collapse file
7.78 KB
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎lib/matplotlib/tests/test_axes.py‎

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5931,3 +5931,20 @@ def test_scatter_empty_data():
59315931
# making sure this does not raise an exception
59325932
plt.scatter([], [])
59335933
plt.scatter([], [], s=[], c=[])
5934+
5935+
5936+
@image_comparison(baseline_images=['annotate_across_transforms'],
5937+
style='mpl20', extensions=['png'], remove_text=True)
5938+
def test_annotate_across_transforms():
5939+
x = np.linspace(0, 10, 200)
5940+
y = np.exp(-x) * np.sin(x)
5941+
5942+
fig, ax = plt.subplots(figsize=(3.39, 3))
5943+
ax.plot(x, y)
5944+
axins = ax.inset_axes([0.4, 0.5, 0.3, 0.3])
5945+
axins.set_aspect(0.2)
5946+
axins.xaxis.set_visible(False)
5947+
axins.yaxis.set_visible(False)
5948+
ax.annotate("", xy=(x[150], y[150]), xycoords=ax.transData,
5949+
xytext=(1, 0), textcoords=axins.transAxes,
5950+
arrowprops=dict(arrowstyle="->"))

0 commit comments

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