1
ax.tick_params
を使用して目盛りが 'オフ'に設定されているかどうかを確認できます。 ax
オブジェクトを調べて、それらがオフになっているかどうかを調べる方法はありますか?反復するためにmatplotlib `ax`オブジェクトからダンプパラメータを抽出する
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.spines['top'].set_visible(False)
ax.spines['bottom'].set_visible(False)
ax.spines['left'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.tick_params(
axis='both',
which='both',
bottom='off',
top='off',
left='off',
right='off')
# This is essentially what I want to be able to do
assert ax.xticks == 'off'