看板 R_Language 關於我們 聯絡資訊
[問題類型]: 程式諮詢(我想用R 做某件事情,但是我不知道要怎麼用R 寫出來) [軟體熟悉度]: 入門(寫過其他程式,只是對語法不熟悉) [問題敘述]: s 我想要把互動式的圖表放到plotly, 以便合併到PPT上 這是我想要的圖表在R studio上呈現的樣子 https://i.imgur.com/4T7IN83.jpg (內部資料,因此把中文分類換成英文字母代替) 但利用api_create()上傳到plotly後, X軸只剩下數字 https://i.imgur.com/BuKRgCi.jpg 請問這要怎麼修正呢? 或是有沒有別的辦法能把互動式的圖表放到ppt上呢? [程式範例]: s Point_Comm_Channel <- ggplot(final_Channel_perform_Comm, aes(x = Channel, y = total_Amount, color = Name ))+ geom_point(aes(group = Name),size = 1)+ labs(title = "SKU銷售Top 10 in channels", y = "Total Amount(千)") 這是我畫圖的程式碼 [環境敘述]: R version 3.4.4 (2018-03-15) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 Matrix products: default locale: [1] LC_COLLATE=Chinese (Traditional)_Taiwan.950 [2] LC_CTYPE=Chinese (Traditional)_Taiwan.950 [3] LC_MONETARY=Chinese (Traditional)_Taiwan.950 [4] LC_NUMERIC=C [5] LC_TIME=Chinese (Traditional)_Taiwan.950 [關鍵字]: u的是謝謝大家,拜託大家了! ----- Sent from JPTT on my iPhone -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 115.82.17.157 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1525838265.A.2EF.html
kokolotl: 看範例 Point_Comm_Channel 會再ggplotly一次05/09 14:19
sasuke515: 剛剛嘗試了,還是一樣沒辦法耶@@05/09 14:59
問題已解決! 發現必須先 ggplotly(Point_Comm_Channel, dynamicTicks = TRUE) 之後再上傳才不會有問題 謝謝大家! ※ 編輯: sasuke515 (115.82.17.157), 05/09/2018 15:20:17
kokolotl: 原來要加參數,感蝦 05/09 16:00