Skip to content

Instantly share code, notes, and snippets.

@gelicia
Created August 4, 2013 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gelicia/6148830 to your computer and use it in GitHub Desktop.
Save gelicia/6148830 to your computer and use it in GitHub Desktop.
transmogrify this
{"description":"transmogrify this","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/V9yBdT4.png"}
var svg = d3.selectAll('svg');
var g = svg.append('g')
.attr({
transform: "matrix(1,-0.1913832603648,0.312,1.9264,122,77)"
});
g.selectAll('line.horiz')
.data(d3.range(10))
.enter()
.append('line')
.attr({
x1: 0,
y1: function(d,i){return i * 20},
x2: 180,
y2: function(d,i){return i * 20},
stroke: 'black',
'stroke-width': 2
})
.classed("horiz", true);
g.selectAll('line.vert')
.data(d3.range(10))
.enter()
.append('line')
.attr({
y1: 0,
x1: function(d,i){return i * 20},
y2: 180,
x2: function(d,i){return i * 20},
stroke: 'black',
'stroke-width': 2
})
.classed("vert", true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment