Contour Plot in web browser
I need to plot a contour chart in the web browser开发者_如何学JAVA. It needs to be interactive as well. Does anyone know good javascript library, flash or flex libary to do this?
I'm a Flex developer so I can speak to that section of this question at least. From what I've seen this doesn't exist in Flash/Flex (at least in any open available source) and to a large degree this question is too vague to answer, perhaps link to some example images of what it is you're trying to create. From doing a Google search of contour chart images I see there's quite a variety of implementations based on different usages. In general though within Flex there's a datavisualization framework that includes some starting points for doing charting if you're interested in checking that out a bit more here's the link: http://livedocs.adobe.com/flex/3/html/help.html?content=Part7_DataVis_1.html
Alternatively you could start bit more "from scratch" and use Degrafa as the starting point: http://livedocs.adobe.com/flex/3/html/help.html?content=Part7_DataVis_1.html
Or just go all the way and do it for real from scratch using the flash drawing primitives, if you have a clear understanding of your goal and the chart isn't expected to be re-used in lots of varying scenarios you may be best off going this route as you'll have the tightest control over the end product. I did this for building a pseudo 3D bar chart and it was actually easier than expected, I haven't yet but I'll post the code along with some other charts I've made at http://www.shaunhusain.com/charts (need to reboot to linux to get that example, will post within the next 4 hours).
Shaun
plotly.js
https://plot.ly/javascript/contour-plots/
https://plot.ly/javascript/reference/#contour
var data = [ {
z: [[10, 10.625, 12.5, 15.625, 20],
[5.625, 6.25, 8.125, 11.25, 15.625],
[2.5, 3.125, 5.0, 8.125, 12.5],
[0.625, 1.25, 3.125, 6.25, 10.625],
[0, 0.625, 2.5, 5.625, 10]],
type: 'contour'
}
];
var layout = {
title: 'Basic Contour Plot'
}
Plotly.newPlot('myDiv', data, layout);
精彩评论