11-04-2017 06:17 AM
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??
11-04-2017 09:23 AM
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.
11-04-2017 12:05 PM
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
11-04-2017 12:15 PM
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).
11-05-2017 11:09 AM
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
11-05-2017 02:41 PM
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.
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.
11-06-2017 12:20 PM
thanks !! but i think altenbach is right .. histogram is not what i really need....
11-06-2017 12:38 PM
@CHRISTIAN ALTENBACH this graph reminds me the hough transform!! huhuh...
however i dont see any input of a 2d array....
11-06-2017 12:46 PM - edited 11-06-2017 12:48 PM
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.
03-28-2023 04:37 AM
Hello, could you please send me the sub VI of Advanced Plotting Toolkit by Heliosphere Research LLC?