【发布时间】:2017-06-14 20:03:33
【问题描述】:
这是我正在使用的代码 -
g.volume <- ggplot (time_series, aes(x=quotedate, y=cv)) +
geom_col(position='dodge',fill='steelblue1', size=.8) +
geom_col(aes(x=quotedate, y=pv) ,position='dodge', fill='hotpink1', size=.8) +
labs(x = "", y = "Call / Put Volume") + theme_bw() +
theme(axis.ticks.x=element_blank(), axis.text.x=element_blank()) +
theme(panel.grid.major = element_line(colour = "grey", size=.5,linetype = 'dashed'))
输出在数值上是正确的,但两个 Y 变量是堆叠的,而不是并排躲避。网络上的许多示例都没有直接与时间序列数据(X 轴)相关,而是与少数类别相关/我尝试旋转数据的尝试充其量是混乱的,并且不起作用。
【问题讨论】:
-
请edit您的问题并提供数据以重现您的问题。见minimal reproducible example。