Plotly Maps Not Rendering in R

时间秒杀一切 提交于 2019-11-30 14:19:06

I have had similar troubles with plotly rendering choropleth maps in the RStudio Viewer. Even copying the code exactly as provided in your links to the ployly website gave me just a title and legend, but no map.

However, when I expanded the Viewer using the "Show in new window" button, the choropleth opens up in my web brower fully rendered.

This leads me to believe that the issue is either:

  1. Something to do with the plotly package itself not correctly working within RStudio's environment (doubt it's this) or,
  2. It's just one of those instances where the plot doesn't render because the size of the Viewer window is too small. I have that happen if I run something like "pairs" on a large data frame with a lot of correlations. It doesn't show in the viewer unless I expand it to a larger size or render it in a browser window.

I would like to know if there are any settings either in RStudio or in the packages themselves that may fix this.

EDIT: I do not encounter this issue when rendering the plot on my laptop -- just my desktop. I believe both are running the latest R/RStudio versions so I'm not sure why one renders and one does not.

You currently need an internet connection to view the scattergeo trace type -- https://github.com/ropensci/plotly/issues/356

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!