0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

APLpyで軸目盛の間隔を調整したいとき

Posted at

APLpyで軸目盛の間隔を調整する方法で少しハマったのでメモ。

例えばx軸の主目盛の表示間隔を調整したいときはdegrees単位で

.py
fig.ticks.set_xspacing(0.0005)

とやればいい。ただし、このとき引数はlabel formatの最小単位の倍数でなくてはならない。
いま

.py
fig.ticklabels.set_xformat(hh:mm:ss.ss)

としていたなら最小単位は0.001sすなわち0.015arcsec、したがって0.015/3600 degreeである。これを基準にしていっぱんにはnを整数としてn*0.015/3600の数をset_xspacingに入れてやれば良い。

####参考
APLpy documentation — aplpy v2.0.2
Overlapping tick labels on x axis · Issue #258 · aplpy/aplpy

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?