Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在默认的 Lattice 条形图中,分类变量标签放置在左侧。我也想把它们放在右边。我可以使用 来操作数字刻度和标签的位置scales,但在移动分类标签方面没有成功。研究help(barchart)和萨卡的书并没有得出答案(这并不是说答案不存在)。
scales
help(barchart)
你的scales论点是正确的。尝试添加alternating = 3到 y 比例参数列表。
alternating = 3
barchart(variety ~ yield, data = barley, groups = year, stack = TRUE, ylab = "Barley Yield (bushels/acre)", scales = list(x = list(rot = 45), y = list(alternating = 3)), horizontal = TRUE)