Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c917b09 commit 06b5ed5Copy full SHA for 06b5ed5
1 file changed
lib/matplotlib/tests/test_text.py
@@ -140,10 +140,10 @@ def test_contains():
140
141
contains, _ = txt.contains(mevent)
142
143
- color = {False: 'red', True: 'yellow'}.get(contains)
+ color = 'yellow' if contains else 'red'
144
145
# capture the viewLim, plot a point, and reset the viewLim
146
vl = ax.viewLim.frozen()
147
ax.plot(x, y, 'o', color=color)
148
ax.viewLim.set(vl)
149
-
+
0 commit comments