This browser does not support music or audio playback. Please play it in WeChat or another browser.           
        
       
      
     
    
   
  
 14. 热图绘制  
 清除当前环境中的变量  
 rm(list=ls())设置工作目录  
 setwd("C:/Users/Dell/Desktop/R_Plots/14heatmap/")使用heatmap函数绘制热图   # 使用mtcars内置数据集 
   
     
   
 heatmap(x, #表达矩阵 
   
     
   
 使用gplots包中的heatmap.2函数绘制热图   library(gplots) 
   
     
   
 heatmap.2(x, scale="col", 
   
     
   
 使用ggplot2包绘热图   library(ggplot2) 
   
     
   
 # 更换填充颜色 
   
     
   
 # Color Brewer palette 
   
     
   
 # Color Brewer palette 
   
     
   
 使用lattice包中的levelplot函数绘制热图   library(lattice) 
   
     
   
 # 更换颜色 
   
     
   
 # 查看内置数据集 
   
     
   
 # 使用RColorBrewer包中的配色 
   
    
   
 # 使用viridisLite包中的配色 
   
    
   
 sessionInfo()