巨蟒的bokeh热图
bkheatmap的Python项目详细描述
python的交互式热图
bkheatmap是一个基于Bokeh的python模块,用于绘制 交互式热图更容易!
安装
$ pip install bkheatmap
使用量
请下载mtcars.txt并运行bkheatmap,如下所示:
在python脚本中用作模块
importosimportpandasaspdfrombkheatmapimportbkheatmapinfile="mtcars.txt"prefix=os.path.splitext(infile)[0]df=pd.read_table(infile,index_col=0)bkheatmap(df,prefix=prefix,scale="column")
或用作shell中的命令
$ bkheatmap --scale column mtcars.txt
然后将生成一个类似this的html文件。