Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Pick events broken in log axes #3540

Closed
@lpsinger

Description

@lpsinger

Handling pick events does not work on logarithmic axes. See the example below. As long as the line statementax.set_xscale('log') is commented out, clicking on the polygons created byaxvspan xauses them to change from gray to red. Uncomment that line to make the x axis logarithmic, and clicking on the polygons has either no effect or is misdirected to the far-left polygon only.

frommatplotlibimportpyplotaspltfig=plt.figure()ax=fig.add_subplot(111)ax.set_xlim(1,10)foriinrange(1,10,3):ax.axvspan(i,i+1,color='gray',picker=True)# uncomment this line to break the picker# ax.set_xscale('log')defonpick(event):event.artist.set_color('red')fig.canvas.draw()fig.canvas.mpl_connect('pick_event',onpick)plt.show()

Tested on version 1.4.0 and master as of04496b0 on Mac OS X Mavericks.

[TAC edited for formatting]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp