-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I am trying to add annotation to the points in a plot. But the code kept running forever. I'd appreciate if anyone can provide some insight on this. Thanks.
Eventually, I got this error:
Error in as(file[[1]], "XMLInternalDocument") :
no method or default for coercing “XMLNodeSet” to “XMLInternalDocument”subcount<-sample(1:50,100,replace=T)
avgcount<-mean(subcount)
doc = svgPlot({
plot(1:100, subcount, ylab='count', main="Daily analysis in the past 100 days")
}
)
ptz = getPlotPoints(doc)
tips = paste("Count: ", subcount)
addToolTips(ptz, tips, addArea = TRUE)
saveXML(doc, "test.svg")The following code ran well.
subcount<-sample(1:50,100,replace=T)
avgcount<-mean(subcount)
doc = svgPlot({
plot(1:100, subcount, ylab='count', main="Daily analysis in the past 100 days", type='h')
points(1:100, subcount)
abline(h=avgcount, lwd=2, col='red')
}
)
ptz = getPlotPoints(doc)
tips = paste("Count: ", subcount)
addToolTips(ptz, tips, addArea = TRUE)
saveXML(doc, "test.svg")Metadata
Metadata
Assignees
Labels
No labels