當我在ggplotly()中爲具有大量構面組的閃亮應用程序執行facet_grid時,情節會混亂。但它在Shiny之外正常工作。 我該如何解決這個問題? 我懷疑它是連接到Y規模,但我找不到解決方案。 下面是基於diamonds example from plotly的可重複的示例。閃亮的 比較與非閃亮輸出:Comparison of facet_grid outside and within Sh
給定繪圖使用ggplot2繪製生成條形圖。我想用ggplotly(p)創建一個類似的水平barplot。嘗試使用geom_bar()中的屬性coord_flip(),但沒有幫助。請幫助我,謝謝。 library(plotly)
dat <- data.frame(
time = factor(c("Lunch","Dinner"), levels=c("Lunch","Dinner")),
t
好奇如何使用ggplot或plotly庫函數來繪製這個dotplot。還要在各個點上標記mpg值。 # Dotplot: Grouped Sorted and Colored
# Sort by mpg, group and color by cylinder
x <- mtcars[order(mtcars$mpg),] # sort by mpg
x$cyl <- factor(x$cy