问题描述:

I would like to map 1-1000 to 1-190, my map function is:

`f(x) = { x if 1<=x and x<=100,`

100 + (x-100)/10 if 100 < x <= 1000 }

How should I do?

Finally, got the solution by tracing the source code:

```
d3.scale.linear().domain([1, 100, 1000]).range([1, 100,190]) //poly-linear
```

I'm not familiar with 3d.js, but this is how I would do it in regular JS

```
function toNewScale( x ) {
return Math.round( x / 1000 * 190 );
}
```

if this is what you were asking.