**load the data**
data <-read.csv("https://raw.githubusercontent.com/plotly/datasets/master/school_earnings.csv")
**bubble chart with ggplot**
g<-ggplot(data, aes(x = Women, y = Men, label =School ))+
geom_point(aes(size =gap,alpha=0.5),shape=21, stroke = 0.5,colour = "black")+
geom_text_repel(size = 3,fontface = 'bold', color = 'black',segment.alpha = 0,segment.color = 'grey50' )
**plot output with ggplot**
g
**using ggplolty to convert ggplot to plolty**
ggplotly(g)
**plot output with ggplotly**
[![enter image description here][1]][1]
But this did not print text of bubbles and give warning
**Warning messages:**
1: We recommend that you use the dev version of ggplot2 with ggplotly()
Install it with: devtools::install_github('hadley/ggplot2')
2: In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomTextRepel() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
github.com/ropensci/plotly
我正在使用ggplot
来渲染情节,因为我没有发现任何情节
在数量上以图形方式排斥重叠标签的数量
气泡更多的是情节