Interactive point labels with gridSVG and ggplot2 v.0.9.0

前端 未结 4 768
我在风中等你
我在风中等你 2021-02-02 15:50

I\'d like to label points in a ggplot interactively, so that mousing over a point shows a label.

I\'m trying to adapt the answer given in this question so that it works

4条回答
  •  青春惊慌失措
    2021-02-02 16:33

    This is sort of a general answer. I'm just here to help you make the plot interactive. You can try this -

    library(ggplot2)
    library(plotly)
    
    # Plot how you would normally code for ggplot2
    p <- ggplot(data,... 'add your variables and subsequent plots')
    ggplotly(p)
    

    Enjoy!

提交回复
热议问题