[英]Increase font size in legend of image.plot
我必須使用R中的fields
包中的image.plot
函數來繪制矩陣(通常我更喜歡使用raster
包)。 我無法增加圖例中的字體大小以正確的分辨率導出圖。
library(fields)
mat <- matrix(data = rnorm(500,55.3, 103), nrow = 250, ncol = 250)
image.plot(mat, legend.cex = 12) # nothing
如果我使用額外的參數(例如legend.args
), legend.args
觀察到我僅增加了圖例標題的標簽。
更改legend.cex將更改圖例文本標簽的大小:
image.plot(mat, legend.lab="Test", legend.cex = 12) # Test label in large size
如果要更改圖例中數字值的大小,請嘗試:
image.plot(mat, axis.args=list(cex.axis=2)) # Legend numeric values in large size
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.