LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D HISTOGRAM OF A 2D ARRAY

HELLO TO ALL!!

 

I ve got a 2 d array of random number and i want to cerate the 2d histogram of it by using the  

Advanced Plotting Toolkit , 

2d hist example,

however in this example i see only 2 entrances  of 1d arrays of X , Y bins ... i cannot understand how i could connect my 2d array ..

 

any ideas  please??

1.JPG2.JPG3.JPG

 

 

 

 

Download All
0 Kudos
Message 1 of 11
(6,157 Views)

The toolkit expects N points, each with x,y coordinates and a value of 1.

 

Your data consists of random value on a regular grid (h and v index) and I am not sure how you expect that to translate into a 2D histogram. You could create a 1D histogram with the x-axis from 0 to 1 and each bin indicating a probability to have a point in that range. SInce your random numbers are equally distributed, you should get a relatively flat curve. If you want to show the original 2D array, just use an intensity graph.

0 Kudos
Message 2 of 11
(6,127 Views)

dear  altenbach 

 

 

i know the method with the intensity graph !! i ve already post a topic with my 2d array and an intensity graph .. 

HOWEVER  i still searching ways to ameliorate the graph which depicts the values of my 2d array ..

 

i want a result like thermal imaging 

0 Kudos
Message 3 of 11
(6,118 Views)

If this is a continuation of an existing discussion (intensity graph) provide a link to give context. A histogram is obviously not what you want. I am not familiar with the toolkit, but I am sure there is something more appropriate.

 

(Sorry, posting by phone).

0 Kudos
Message 4 of 11
(6,112 Views)

The documentation in the image you show says it takes 2x 1D array as inputs.  So just split your 2D array appropriately into X and Y data.

 

If you want it to look like a thermal image change the colour map to suite your tastes.  Look in the Advanced plotting toolkit examples for how to do that...

 

http://advancedplotting.github.io/docs/guide/color.html#guide-colormaps

 

 

Message 5 of 11
(6,070 Views)

ElenaP wrote:

 

i know the method with the intensity graph !! i ve already post a topic with my 2d array and an intensity graph .. 

HOWEVER  i still searching ways to ameliorate the graph which depicts the values of my 2d array ..

 


You really need to explain what you want to do. Where is the old discussion with the intensity graph and what's wrong with it? You can create any color ramp you want for the z-scale so your 2D data looks exactly the way you want in the intensity graph.

An example for a custom color ramp can be found here. You only need to define a few vertices, LabVIEW will interpolate between them nicely.

 

memorygraph

 

 

A histogram is about a distribution of numerical data, i.e. counting how often a certain value appears. You don't seem to want to apply any such processing and just display the random 2D data in a heat map or similar. As I said "histogram" in any dimension is the wrong word.

 

 

Message 6 of 11
(6,056 Views)

thanks !! but i think altenbach is right .. histogram is not what i really need....

0 Kudos
Message 7 of 11
(6,018 Views)

@CHRISTIAN ALTENBACH this graph reminds me the hough transform!!  huhuh...Smiley Very Happy

 

 

 

however i dont see any input of a 2d array....

0 Kudos
Message 8 of 11
(6,014 Views)

The 2D array is initialised into the shift register. With respect to this discussion, the example is about the color ramp, not the dynamic data generation it shows.

0 Kudos
Message 9 of 11
(6,011 Views)

Hello, could you please send me the sub VI of Advanced Plotting Toolkit by Heliosphere Research LLC?

0 Kudos
Message 10 of 11
(1,601 Views)