Smoothen heatmap in plotly

后端 未结 1 1231
太阳男子
太阳男子 2020-12-21 00:20

I wanted to create a heatmap of a probability density matrix using plotly.

import numpy as np
from plotly.offline import download_plotlyjs, init_notebook_mod         


        
1条回答
  •  囚心锁ツ
    2020-12-21 00:37

    You can use the zsmooth argument which can take three values ('fast', 'best', or False). For example:

    data = [go.Heatmap(z=[[1, 20, 30],
                          [20, 1, 60],
                          [30, 60, 1]],
                       zsmooth = 'best')]
    iplot(data)
    

    Will give you the following smooth heatmap:

    0 讨论(0)
提交回复
热议问题