代码之家  ›  专栏  ›  技术社区  ›  Matthew Hui

如何更改“trellis”对象的轴标题字体大小?

  •  -2
  • Matthew Hui  · 技术社区  · 6 年前

    我有一个 trellis 格子架 之后

    我已经知道哪些属性控制轴' 标签 my_trellis$x.scales$cex[1] my_trellis$y.scales$cex[1]

    但是斧头呢 标题 字体大小?我找了几遍,还是搞不清楚。。。

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

    你可以改变 trellis 对象 lattice 使用包装 trellis.par.get trellis.par.set

    library(lattice)
    # simulation
    data("quakes")
    Depth <- equal.count(quakes$depth, number=8, overlap=.1)
    trellis <- xyplot(lat ~ long | Depth, data = quakes, main = "Large Font Title")
    
    
    # change title font size
    mt = trellis.par.get("par.main.text")
    mt$cex = 2
    trellis.par.set("par.main.text",mt)
    trellis
    class(trellis)
    

    library