简体   繁体   English

R中使用googleVis包的Google图表叠加层

[英]Google Chart Overlays using googleVis package in R

Google Charts has overlay functionality that allows you to put an image over a plot at a specified position. Google图表具有叠加功能,可让您将图像放置在指定位置的绘图上。 Is this possible in the googleVis package or do I need to edit the chart html ad hoc to include an overlay? 是否可以在googleVis软件包中使用?或者我是否需要临时编辑图表html以包括覆盖图?

You can add an overlay to a Google map using my googleway package. 您可以使用我的googleway软件包在Google地图上添加叠加层。 To use Google Maps you need a valid API key 要使用Google Maps,您需要有效的API密钥

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")

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM