How to get coordinates from a R plotly figure

后端 未结 2 1806
长发绾君心
长发绾君心 2021-01-18 23:54

I have been struggling like mad to solve an apparently basic question. Imagine you have a scatter plot, with say ... 10 markers. I suppose this plot has been generated usin

2条回答
  •  时光说笑
    2021-01-19 00:45

    The solution by Maximilian does not work on Plotly.js versions later than 1.42.0. Trying to fetch

    var bg = document.getElementsByClassName('bg')[0];
    

    returns undefined. The solution works using version 1.41.3.

    This answer is most likely more suited to be a comment but my reputation does not meet the minimum requirement of 50.

提交回复
热议问题