Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Data array format for Intensity Graph
Data array format for Intensity Graph [message #1263729] Tue, 04 March 2014 13:32 Go to next message
Steven Darnell is currently offline Steven Darnell
Messages: 18
Registered: November 2010
Junior Member
I have looked at the Intensity Graph example and the Javadoc for IntensityGraphFigure; however, I am still having trouble understanding the format required for the data array. It is not clear to me why the simulation data array (simuData) is twice as long as the data array, how the array index corresponds to the row/column of the graph, and whether any normalization of the data is required before passing it to the graph.

Could someone provide a description to clarify these issues? Thanks in advance.
Re: Data array format for Intensity Graph [message #1265482 is a reply to message #1263729] Thu, 06 March 2014 01:35 Go to previous messageGo to next message
Xihui Chen is currently offline Xihui Chen
Messages: 3
Registered: December 2013
Junior Member
IntensityGraph displays 2D array data to a 2D image with each point maps a color from the color map, but the input data must be in 1D array format, in which the values are arranged in row by row so it can be converted to a 2D array. For example, for a N rows by M columns 2D data, the input data should like this:
InputData = P11, P12,...P1M, P21, P22, ... P2M, ... PN1, PN2, ...PNM

For example, for an image of 3X3:

1,2,3
4,5,6
7,8,9

The input array should be [1,2,3,4,5,6,7,8,9] by calling setDataArray(). Another important thing is that you need to call setDataWidth(3) and setDataHeight(3) to tell it the array height and width.



Re: Data array format for Intensity Graph [message #1269346 is a reply to message #1265482] Tue, 11 March 2014 14:57 Go to previous message
Steven Darnell is currently offline Steven Darnell
Messages: 18
Registered: November 2010
Junior Member
@Xihui, I have successfully created the data array thanks to your clear reply.
Previous Topic:I can't find the source code of swtplus 1.0
Next Topic:IntensityGraph with XY trace data
Goto Forum:
  


Current Time: Tue Jul 29 14:58:26 EDT 2014

Powered by FUDForum. Page generated in 0.01521 seconds