2016-11-22 45 views
-1

最近,我正在研究一個閃亮的項目,並且想要使用renderplotly(ggplot對象)製作條形圖。爲什麼條形圖的負面條不顯示在閃亮的應用程序中?否定部分不顯示。任何理由嗎?我的代碼是不相關的,但它是爲什麼在有光澤的應用程序中不顯示條形圖的負面條形圖

我的代碼:

g_dpnl_ts <- ggplot(aes(x=time), data=dpnl_ts) + 
    geom_bar(aes(y=value), fill = "dodgerblue4", stat="identity", size=0.5) + # Specify bar ts plot 
    geom_abline(slope = 0, intercept = 0, aes(color="red")) + # horizontal line @ y=0 
    xlab("Period of Observation") + ylab("Millions of US Dollars ($)") + # label 
    #scale_fill_manual(values = c("tomato", "forestgreen")) + #For conditional coloring 
    theme(legend.position = "none") + #turn off the legends 
    scale_x_date(date_breaks = "1 month", date_labels = "%b", date_minor_breaks = "1 month") + #Add x-axis ticks 
    theme(axis.text = element_text(size = rel(1.25))) + # Change axis label text size 
    theme(axis.title.x = element_blank()) # Remove x-axis label 

The negative area is omitted.

+0

你有沒有試過在光亮之外產生這種情節?那麼顯示的是否定條? – user5029763

回答