使用 R 的 Trelliscope 視覺化巨量資料
Ryan Hafen
Author, TrelliscopeJS
只要在 facet_trelliscope() 加上 as_plotly = TRUE 即可。
例如:
gap_life <- select(gapminder, year, lifeExp, country, continent)
ggplot(gap_life, aes(year, lifeExp)) +
geom_point() +
facet_trelliscope(~ country + continent,
name = "lifeExp_by_country",
desc = "Life expectancy vs. year for 142 countries.",
nrow = 2, ncol = 3,
as_plotly = TRUE)

只要在 facet_trelliscope() 加上 auto_cog = TRUE 即可。
例如:
ggplot(gap_life, aes(year, lifeExp)) +
geom_point() +
facet_trelliscope(~ country + continent,
name = "lifeExp_by_country",
desc = "Life expectancy vs. year for 142 countries.",
nrow = 2, ncol = 3,
auto_cog = TRUE)
請參考 autocogs::autocog 的說明文件,以了解可用的自動認知統計。

可用 scales 參數控制座標軸範圍。
三種選項:
"same"(預設)"sliced""free"所有面板的範圍相同。
可在面板間進行「同類比較」。

每個面板的範圍跨度相同,但起點不一定一致。
適合比較尺度差異。

每個面板的範圍依各自資料界限決定。

使用 R 的 Trelliscope 視覺化巨量資料