Underscore example:
_.each([1, 2, 3], function(num) { alert(num); });
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
<title>Download SVG</title> | |
<style type="text/css"> | |
a{ | |
cursor: pointer; | |
text-decoration: underline; | |
color: black; |
<html> | |
<head> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.6.0"></script> | |
</head> | |
<body> | |
<svg> | |
<defs> | |
<mask id="rekt"> | |
<g id="rrr"> |
license: gpl-3.0 | |
redirect: https://observablehq.com/@mbostock/best-candidate-circles |
ExportPlot <- function(gplot, filename, width=2, height=1.5) { | |
# Export plot in PDF and EPS. | |
# Notice that A4: width=11.69, height=8.27 | |
ggsave(paste(filename, '.pdf', sep=""), gplot, width = width, height = height) | |
postscript(file = paste(filename, '.eps', sep=""), width = width, height = height) | |
print(gplot) | |
dev.off() | |
png(file = paste(filename, '_.png', sep=""), width = width * 100, height = height * 100) | |
print(gplot) | |
dev.off() |
#graph svg g.us rect | |
{ | |
fill: url(#tile-us) #cccccc; | |
} | |
#graph svg g.worldwide rect | |
{ | |
fill: url(#tile-ww) #cccccc; | |
} |
license: gpl-3.0 | |
redirect: https://beta.observablehq.com/@mbostock/rainbow-worm |
license: gpl-3.0 | |
redirect: https://observablehq.com/@mbostock/rotating-voronoi |
license: mit |
license: gpl-3.0 | |
redirect: https://observablehq.com/@d3/drag-zoom |