You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug summary
When plotting with a logarithmic scale on the y-axis, patches have incorrect picking behaviour.
Text seems to work correctly, but FancyArrowPatch cannot be picked at all and the pick area for circles is very far off to the left.
Code for reproduction
Make sure to uncomment the scaling line if you want to see the bug!
from __future__ importprint_functionfrommatplotlibimportpyplotaspltfrommatplotlibimportpatchesfrommatplotlibimporttextdefpick_event(event):
print("PICK", event.artist)
defmain():
fig=plt.figure()
axes=fig.add_subplot(111)
# Uncommenting this makes picking break for the patches.# The circle will have a wierd selection box to the left side of the plot,# and the line will not be selectable at all.# axes.set_yscale('log')axes.set_xlim((0, 5))
axes.set_ylim((1e-1, 10))
# Add an arrow.arrow=patches.FancyArrowPatch(
(3, 2),
(4, 3),
)
arrow.set_picker(4)
axes.add_patch(arrow)
# Add a circle.circle=patches.Circle(xy=(1.90, 0.5), radius=0.1)
circle.set_picker(4)
axes.add_patch(circle)
# Add some text.text_=text.Text(1, 1, 'text')
text_.set_picker(4)
axes.add_artist(text_)
# Connect the pick event and show the plot.fig.canvas.mpl_connect('pick_event', pick_event)
plt.show()
if__name__=='__main__':
main()
Actual outcome
Only the text is properly pickable.
Expected outcome
Everything should be properly pickable.
Matplotlib version
Operating System:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
Bug report
Bug summary
When plotting with a logarithmic scale on the y-axis, patches have incorrect picking behaviour.
Text seems to work correctly, but FancyArrowPatch cannot be picked at all and the pick area for circles is very far off to the left.
Code for reproduction
Make sure to uncomment the scaling line if you want to see the bug!
Actual outcome
Only the text is properly pickable.
Expected outcome
Everything should be properly pickable.
Matplotlib version
Installed matplotlib via pip:
The text was updated successfully, but these errors were encountered: