标签间隔
如果刻度过于密集,那么标签也会变得密集。 因为标签通常是基于刻度进行绘制的,所以关闭标签的一个好方法便是像上一节一般关闭刻度。 当然我们也可以通过标签自己的方式关闭显示,我们可以定义一定最小的标签显示间距,一旦小于这个距离标签将不会显示。
<ticks>
tick_separation = 2p
label_separation = 5p
...
<tick>
tick_separation = 5p
label_separation = 10p
...
</tick>
...
</ticks>
同样可以通过定义的位置不同来定义局部或者是全局的设置
ideogram边缘的标签设置
<ticks>
min_label_distance_to_edge = 10p
...
<tick>
min_label_distance_to_edge = 5p
...
</tick>
...
</ticks>
当然如果tick已经被抑制了的话标签将自动不会显示
取消第一个或者最后一个标签
同上面一样,有的时候边缘(特别是首尾)我们不希望出现标签,那么便可采用以下设置
<ticks>
skip_first_label = yes
skip_last_label = yes
...
<tick>
# will overwrite the skip_first_label for this tick group
skip_first_label = no
...
</tick>
...
</ticks>
tick.conf
show_ticks = yes
show_tick_labels = yes
<ticks>
radius = dims(ideogram,radius_outer)
multiplier = 1e-6
label_offset = 5p
thickness = 3p
size = 20p
# ticks must be separated by 2 pixels in order
# to be displayed
tick_separation = 2p
# Density of labels is independently controlled.
# While all tick sets have labels, only labels
# no closer than 5 pixels to nearest label will be drawn
label_separation = 5p
<tick>
spacing = 0.5u
color = red
show_label = yes
label_size = 14p
label_offset = 0p
format = %.1f
</tick>
<tick>
spacing = 1u
color = blue
show_label = yes
label_size = 16p
label_offset = 0p
format = %d
</tick>
<tick>
spacing = 5u
color = green
show_label = yes
label_size = 20p
label_offset = 0p
format = %d
</tick>
<tick>
spacing = 10u
color = black
show_label = yes
label_size = 24p
label_offset = 5p
format = %d
</tick>
</ticks>
官方完整conf here