Increase significant digits in pyplot cursor

前端 未结 1 1621
难免孤独
难免孤独 2021-01-22 18:12

I have a function plotted using pyplot. When I move the cursor over the window, I can see the values for X and Y of the location of the cursor at the bottom-left of the window (

相关标签:
1条回答
  • 2021-01-22 18:52

    You can entirely customize the text that displays info about the cursor's current location:

    ax = plt.gca()
    ax.format_coord = lambda x,y: '%10d, %10d' % (x,y)
    
    0 讨论(0)
提交回复
热议问题