user1089964
user1089964

Reputation: 87

How to plot an array of numbers as an image using Javascript?

I would like to plot an array of numbers (int/float/binary/..) as an image using Javascript and I don't know exactly how to do it..

The system is composed of a CORE part done in C++ and a GUI part done in jQuery, and I have to show results calculated by the CORE in the GUI side. I can pass them in any format such as binary files, XML files,... but I don't know how the GUI might plot an array of numbers and show them as an image to the user.. Also It may be useful to have an scale of colours..

any suggestion on doing that? any available library for that purpose? every idea is welcome!

thanks in advance! cheers

Upvotes: 1

Views: 1776

Answers (2)

Sirko
Sirko

Reputation: 74046

Have a look at d3.js. This library provides plenty of possible visualizations and is quite easy to customize.

Upvotes: 2

xiaoyi
xiaoyi

Reputation: 6741

Here is a list of plot libs in js: http://javascript.open-libraries.com/utilities/chart/20-best-javascript-charting-and-plotting-libraries/

You need to format your data in json to get it work. if the data set is very big, better to plot is on server side and send a image file to client.

Upvotes: 0

Related Questions