R - 设置气泡图的颜色变量

时间:2017-09-04 12:16:27

标签: r bubble-chart googlevis

如何根据因子变量更改气泡的颜色?我的代码如下:

library(googleVis)
motion <- gvisMotionChart(temp1,
                      idvar="Location",
                      timevar="Year",
                      xvar = "Population_thousand", yvar = "AvgHouseholdDisposableIncome",
                      colorvar = "Country",
                      sizevar = "BubbleSize",
                      options=list(height = 620, width = 1280))
plot(motion)

今天颜色不太好,我想根据国家/地区提供更好的颜色。

enter image description here

0 个答案:

没有答案