简体   繁体   English

在R中使用googleVis控制气泡图圆的大小

[英]controling size of Bubble chart's circle using googleVis in R

I did it using googleVis 我是用googleVis

> library(googleVis)

> trees2<-trees

>trees2$id<-as.character(1:31)

> Bubble<-gvisBubbleChart(trees2,idvar="id",xvar="Girth",yvar="Height",sizevar="Volume",options=list(vAxis="{title:'height'}",hAxis="{title:'Girth'}"))

> plot(Bubble)

and I had a chart but the circles are too large;; 我有一张图表,但圆圈太大;

Is there a way to control the size of the circle just like the symbols function? 就像符号功能一样,有没有办法控制圆的大小?

You can use the sizeAxis option 您可以使用sizeAxis选项

library(googleVis    
trees2<-trees    
trees2$id<-as.character(1:31)    
Bubble<-gvisBubbleChart(trees2, idvar="id", xvar="Girth" ,yvar="Height",sizevar="Volume"
                        , options=list(vAxis="{title:'height'}",hAxis="{title:'Girth'}", sizeAxis = '{minValue: 0,  maxSize: 10}'))    
plot(Bubble)

Full list of options are given here . 完整的选项列表在这里给出。

气泡图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM