代码之家  ›  专栏  ›  技术社区  ›  Herman Toothrot

plot3d库中的cex参数

  •  0
  • Herman Toothrot  · 技术社区  · 8 年前

    在绘制image2d时,我找不到任何关于如何使用cex参数的指示。看来cex参数没有任何效果。我可以用特定的CEX参数更改图例和轴的字体大小,但是我不能更改标题标题字体大小。

    有没有办法用一个参数改变绘图的字体大小?标题字体大小是如何改变的?

    1 回复  |  直到 8 年前
        1
  •  1
  •   Artem Alex Seam    8 年前

    你说得对,我在文件里也没有找到。 要更改标题字体大小,可以设置参数 cex.main 在里面 image2D 是的。见下文:

    library(plot3D)
    nr <- nrow(volcano)
    nc <- ncol(volcano)
    image2D(volcano, x = 1:nr, y = 1:nc, lighting = TRUE, 
            main = "volcano", clab = "height, m", cex.main = 3)
    

    Title Font Size Increase

    要全局放大字体大小,可以更改全局参数 cex 是的。 请参见以下内容:

    library(plot3D)
    nr <- nrow(volcano)
    nc <- ncol(volcano)
    
    prev <- par(cex = 1.7)
    image2D(volcano, x = 1:nr, y = 1:nc, lighting = TRUE, 
            main = "volcano", clab = "height, m")
    
    par(prev)
    

    All labels increased