LoginSignup
0
0

More than 1 year has passed since last update.

matplotlibでtickparamsを使ってもticklabelが消えないときの対処法

Posted at

おそらく対数スケールかつ目盛りが細かすぎる場合にTickが消えないことがあります.

import matplotlib.pyplot as plt

_, ax = plt.subplots()
ax.tick_params(left=False, labelleft=False)
ax.set_yscale('log')
ax.grid(which='minor', color='gray', linestyle=':')
ax.grid(which='major', color='black')

このときにAd-hocに対応するためにFontsizeを最小にするほうほうがあります.

ax.tick_params(axis='y', which='major', labelsize=1)
ax.tick_params(axis='y', which='minor', labelsize=1)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0