回答編集履歴

1

2024/06/03 09:02

投稿

melian
melian

スコア20420

test CHANGED
@@ -10,7 +10,7 @@
10
10
  def show_cursor_position(x, y2):
11
11
  ax2_coord = ax2.transData.transform((x, y2))
12
12
  y1 = ax1.transData.inverted().transform(ax2_coord)[1]
13
- return (f'x = {x:.3f} y1 = {y1:.3f} y2 = {y2:.3f}')
13
+ return f'x = {x:.3f} y1 = {y1:.3f} y2 = {y2:.3f}'
14
14
  return show_cursor_position
15
15
 
16
16
  ax2.format_coord = cursor_position_format(ax, ax2)