2016-05-18 8 views
2

次の光沢のあるアプリでは、下のmainPanelとsiderbarPanelの間にスペースを追加したいと思います。 enter image description heremainPanelとsideerbarPanelの間に光沢のあるスペースを追加

ここでは、x軸のティックを読み取ることができません。回転させようとしましたが、それは改善されませんでした。 また、plotlyOutputの高さと幅を変更しましたが、機能しません。 HTML("<br><br><br>")を追加しようとしましたが、問題はおそらくggplotまたはpllyからですか?

マイggplotスクリプトは次のとおりです。

ggplot(data = df, aes(x = perimetre_commercial_estime, 
         y = nbr_ligne, 
         fill = perimetre_commercial_estime)) + 
    geom_bar(stat="identity") + theme_light() + 
    theme(axis.text.x=element_text(angle=30,hjust=1,vjust=0.5,size=6), 
             axis.title.x=element_blank(), 
      legend.position="top", legend.direction="horizontal") + 
    scale_fill_discrete("") 

plotly doesntのサポート水平伝説、以下のグラフィックが正常であるようにします。

おかげ

+0

の可能性のある重複した[シャイニーダッシュボードのメインパネルに多くの空白を追加する方法?](http://stackoverflow.com/questions/33266157/how-to-add-more-whitespace-to-the -main-panel-in-shiny-dashboard) –

+0

実際には同じではありませんが、私は別の解決法を試みましたが、誰も仕事をしませんでした –

答えて

3

このPlotly Setting Graph Size in R記事は役に立つかもしれません。あなたはすべてのコードを含んでいないので、私は完全には確認できません。私にお知らせください。

library(plotly) 
library(dplyr) 

gp = ggplot(
    data = mtcars %>% add_rownames(), 
    aes(x = rowname, y = mpg) 
) + geom_point() + 
    theme(axis.text.x=element_text(angle=30,hjust=1,vjust=0.5,size=6), 
     axis.title.x=element_blank()) 

ggplotly(gp) %>% 
    layout(
    margin = list(
     b=100 
    ) 
) 
+0

本当にありがとうございました リスト内のl、r、b、 (inyour link)pls? –

+0

l =左、r =右、b =下、t =上 – timelyportfolio

+0

助けてくれてありがとう! –

関連する問題