用pheatmap函数在Linux系统上画图
输入数据格式:如下
p2=pheatmap(marker,cluster_cols = T,cluster_rows = T,clustering_distance_rows = "correlation",scale = 'column',colorRampPalette(colors = c("blue","white","red"))(100),treeheight_row = 20,treeheight_col = 20,cellwidth = 15,cellheight =15,border_color = 'white',fontsize = 15,legend_labels = 'scale.avg_logFC',legend = T)
结果出现了如下error:
Error in .External2(C_X11, d$display, d$width, d$height, d$pointsize, : ,border_color = 'white',fontsize = 15,legend_labels = 'scale.avg_logFC',legend = T)无法打开X11cairo设备
这里只需要补充一个参数就行:silent = T,函数默认silent=F,参数解释如下:
do not draw the plot (useful when using the gtable output),而我们使用xshell连接服务器时,无法实现画图,故出现error,把silent改成T,让它不画图,就可以啦,正常出出图用ggsave保存就可以啦