Skip to content

Instantly share code, notes, and snippets.

@lirongfei123
Created January 29, 2019 02:45
Show Gist options
  • Save lirongfei123/2cbd373df5df9074bf114ba5b79eddfb to your computer and use it in GitHub Desktop.
Save lirongfei123/2cbd373df5df9074bf114ba5b79eddfb to your computer and use it in GitHub Desktop.
d3
```
const path = d3.path()
path.rect(0, 10, 30, 40);
console.log(path);
svg.append('g').append("path").attr('d', path.toString())
.style("stroke", 'red');
```
```
var svg = d3.select('#c1').append('svg')
.attr('width', '800')
.attr('height', '800')
.append('g');
```
var x = d3.scaleLinear()
.domain([10, 130])
.range([0, 960]);
d3.randomUniform(1, 5)() 返回一个大于等于 1 且小于 5 的随机数.
分布方式:
一般分布
高斯分布
对数分布
贝次分布
指数分布
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment