Changing ticks mark period in Holoviews heatmap

前端 未结 2 1081
闹比i
闹比i 2021-01-16 18:17

I have the following heatmap made by Holoviews. I need to change x ticks to change the period of x ticks. [0,2,4,...] instead of [0,1,2,3,4,..]

data = [(i, j         


        
2条回答
  •  Happy的楠姐
    2021-01-16 19:08

    With HoloViews >= 1.13, you can now use keyword .opts(xticks) and .opts(yticks) for setting continuous (non-categorical) ranges.

    Example:

    data = [(i, j,  i*j) for i in range(10) for j in range(10)]
    
    hv.HeatMap(data).opts(xticks=[0, 3, 6, 9], yticks=[0, 5, 9])
    



    Resulting plot:

提交回复
热议问题