Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Geom_text_repel not working in plotly

#load the data
data <- read.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


#using ggplolty to convert ggplot to plolty

#plot output with ggplotly

Screen Shot 2017-07-09 at 4.46.09 PM

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

Screen Shot 2017-07-09 at 4.48.00 PM

I am using ggplot to render the plot because i didn’t found any way in plotly to repel the overlapping labels when the number of bubbles are more on plot