I want to include an svg
image in an .Rmd
document. The svg is created using the RSVGTipsDevice
package as I want the image to have some tooltips. The problem is that after the image has been included into the generated HTML document, the tooltips do not work anymore. Although they work properly when I open the svg in a browser (link to image, hover over red rectangle to see the tooltip).
http://www.gridhub.uni-bremen.de/public/pics/plot.svg
Here is the complete .Rmd
code:
```{r}
library(RSVGTipsDevice)
devSVGTips("plot.svg", toolTipMode=1)
plot(0, type="n")
setSVGShapeToolTip("A rectangle","it is red")
rect(.1,.1,.4,.6, col='red')
dev.off()
```
![alt text](plot.svg)
The question is: How can I make the tooltips work?
Does my comment help? To be clear, the ![alt text](plot.svg)
portion becomes <img src="plot.svg">
which is not a proper way to include svg. To prove this works, I've provided the source and its output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With