gpt4 book ai didi

r - 如何在 auto.key(格子)中的符号后放置文本?

转载 作者:行者123 更新时间:2023-12-02 22:23:59 36 4
gpt4 key购买 nike

lattice中使用auto.key时,是否可以交换符号和文本的默认位置?也就是说,我希望图例中的文本相对于符号位于右侧。我知道使用 key 很容易做到这一点,但是将颜色与每个图的组分开链接不仅乏味,而且很容易出错。

最佳答案

不,你不能得到 auto.key为你做这件事。原因如下:

  • auto.key通过将参数列表传递给 simpleKey() 来工作.来自 ?xyplot :

    auto.key: A logical, or a list containing components to be used as arguments to 'simpleKey'.

  • simpleKey() in turn 构造一个列表(最终传递给 draw.key() ),其中文本元素始终排在第一位。这是 simpleKey() 的关键行:

    ans <- list(text = list(lab = text), col = col, cex = cex, 
    alpha = alpha, font = font, fontface = fontface, fontfamily = fontfamily,
    ...)

关于r - 如何在 auto.key(格子)中的符号后放置文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13255036/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com