【发布时间】:2011-05-25 19:12:56
【问题描述】:
我想用 ggplot 绘制一组时间序列,打印在 B5 纸上。
能够制作这个情节:
qplot(trade.date, value, data = meltreg2, geom='line', group = variable) +
facet_grid(variable ~ ., scale = 'free_y') +
scale_x_date(expand=c(0,0), name='') +
opts(strip.text.y = theme_blank(), strip.background = theme_blank(), panel.background =
theme_rect(), panel.grid.major=theme_blank(), panel.grid.minor=theme_blank(), axis.title.x =
theme_blank(), axis.title.y = theme_blank(), panel.margin = unit(0.5, 'line')
)
但是有什么方法可以在所有图表(三个图表)上获取刻度和文本?
我应该如何保存绘图以最适合 B5(横向)页面?
我想在所有 x 轴上有刻度和文本,而不是用 theme_blank() 隐藏它们。 (上图的默认设置是“最后”绘制的图表上的刻度和文本,但我需要全部)
【问题讨论】:
-
对于最后一个问题,您应该使用适当的图形设备函数,例如 pdf() 或 tiff(),以及适当的“特殊”设置。