5
matplotlibの図が表示されているときにデフォルトで「矩形にズーム」ツールが自動的に有効になる方法はありますか?
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(-300, 300)
y = x**2-7*x
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
plt.plot(x, y)
# Add something here to activate the "Zoom to rectangle" tool?
plt.show()
これはおそらく、バックエンドに依存します。どのバックエンドを使用しますか?明確にするために、私は答えを知らない。 :) –
私は最初のコメントに間違っていました:http://matplotlib.sourceforge.net/api/backend_bases_api.html#matplotlib.backend_bases.NavigationToolbar2.zoomこのメソッドを呼び出さなければならないオブジェクトはわかりません。 –
私はGtkAggを使用しています。 – unutbu