admin管理员组文章数量:1208153
Does anyone know of good examples producing a polar plot using the D3 Javascript libraries?
I've seen some rose plots like this and this, but I'm really looking for something more similar to the Matlab polar plot:
Any examples would be greatly appreciated. Thanks!
Does anyone know of good examples producing a polar plot using the D3 Javascript libraries?
I've seen some rose plots like this and this, but I'm really looking for something more similar to the Matlab polar plot:
Any examples would be greatly appreciated. Thanks!
Share Improve this question asked Jan 18, 2013 at 17:29 supyosupyo 3,0372 gold badges23 silver badges35 bronze badges2 Answers
Reset to default 18Sure, here you go:
The function is plotted using d3.svg.line.radial. The background radial grid is implemented as line, circle and text elements. One minor annoyance is that the code needs both radians (for d3.svg.line.radial) and degrees (for SVG’s transform attribute). I used rotated text labels because that was easy to do with SVG, but you could use non-rotated labels if you don’t mind a little trigonometry to position the text labels.
Note carefully the definition of the line’s angle: D3’s radial lines and areas proceed clockwise starting at 12 o’clock, while this plot proceeds counterclockwise starting at 3 o’clock!
Plotly lets you make interactive polar charts with MATLAB, Python, and R. The results are interactive, and rendered with D3.js. You can see a few MATLAB examples (code + interactive graphs) here.
Disclaimer: I'm on the Plotly team.
本文标签: javascriptPolar plots using D3jsStack Overflow
版权声明:本文标题:javascript - Polar plots using D3.js - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738761638a2110996.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论