2016-11-22 5 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

答えて

関連する問題