Google Chart Overlays using googleVis package in R

☆樱花仙子☆ 提交于 2019-12-25 04:43:28

问题


Google Charts has overlay functionality that allows you to put an image over a plot at a specified position. Is this possible in the googleVis package or do I need to edit the chart html ad hoc to include an overlay?


回答1:


You can add an overlay to a Google map using my googleway package. To use Google Maps you need a valid API key

library(googleway)
map_key <- 'your_api_key'

google_map(key = map_key) %>%
    add_overlay(north = 40.773941,south = 40.712216, east = -74.12544, west = -74.22655,
                            overlay_url = "https://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg")



来源:https://stackoverflow.com/questions/37758585/google-chart-overlays-using-googlevis-package-in-r

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