【发布时间】:2016-02-06 09:30:17
【问题描述】:
我有以下代码可以正常工作。我想知道是否可以将其导出为 png 文件。任何人都知道一个简单的方法来做到这一点。我才刚刚开始接触 R 世界,所以是个菜鸟。
这是我的代码
library(RODBC)
library(googleVis)
con <- odbcConnect("Live", uid="Rxyzuser", pwd="xxxxx")
attendees <- sqlQuery(con, "exec rpt_r_vis")
regCal <- gvisCalendar(attendees,
datevar="Reg_add_date",
numvar="Counts",
options=list(
title = "Registrations per Day Heatmap",
height = 400, width=1000,
calendar="{yearLabel: { fontName: 'Times-Roman',
fontSize: 32, color: '#1A8663', bold: true}, cellSize: 15,
cellColor: { stroke: 'red', strokeOpacity: 0.2 },
focusedCellColor: {stroke: 'red'}}")
)
plot(regCal)
odbcCloseAll()
【问题讨论】: