我正在使用中的R工作室plot_ly绘制的等高线图。我想轮廓线,直接在图上显示它们的值(像这里的图片:http://www.cyber-wit.com/onlineHelp/Images/contour.png)。我不知道如何实现这一目标。这里是我的代码:
plot_ly(width = 600, height = 600, type = 'contour', z=Matrix_Contour, )
谢谢您的帮助!
为此你需要showlabels = TRUE:
showlabels = TRUE
plot_ly(z = volcano, type = "contour", contours = list(showlabels = TRUE))