Am using R to build my charts with Plotly
I have data set as below and stored in data frame dt
dt = data.frame(category=c(“A”,“B”,“C”),X=c(1,2,3),Y=c(3,4,5))
and am trying to plot bubble chart using plotly as below and color it by category
plot_ly(dt, x =X, y = Y, size = X, mode = “markers”,color = category)
But it is not showing the bubble chart properly.