01-06-2015 04:52 AM
Hi all,
I'm trying to plot a set of XY data but I would like to add to do this as an intensity plot. The data is basically is XY displacement co-ordinates with an associated force for each XY point.
I have been trying to use the 3D surface plot and viewing in the XY plane but can't seem to get it work. Any tips on how to get the desired plot?
I have attached a sample data file if it's any use and the type of plot I would like to produce. Using LV2013 SP1.
Cheers!
01-06-2015 05:35 AM
Hi David,
you could try to use an intensity graph…
- Create a 2D array big enough for your purpose: you need to rasterize your XY plane into the array coordinates. Example: you want to display x values from -50 to 50mm with 0.1mm resolution so you need 1000 columns…
- Now load your data, convert XY coordinates to element index using your raster values.
- In your case you could use the MAX function to replace the array element by the max of new Z value and current Z value.
- After analyzing your data and placing all values in the array you display the array in the intensity graph.
01-06-2015 07:31 AM
Hi Gerd,
Please forgive my ignorance but I'm not familiar with the term how to rasterize data? I assume what you are proposing is to create a fixed x coordinate array of 1000 values and create an array with corresponding y and z values?
Again, sorry for my lack of knowledge 😞
Cheers!
01-06-2015 07:58 AM
Hi David,
"to rasterize": You have an array with a certain number of elements (rows/columns). Then each element (aka pixel) represents a certain range of your X or Y coordinates. Or the other way around: you have to find an element for your XY coordinates by putting the coordinates into the element raster…
That 2D array will only store your Z values, the element index represents the XY coordinates.
01-07-2015 07:13 AM
Hi Gerd,
I think I have a working version so thanks for your help so far! Kudos 🙂
Do have another question regarding the intensity plot, can you have multiple plots on the one graph or is limited to the single plot? I'd like to do multiple plots and use something similar to the 'Plot Visible' property in standard graphs?
Cheers!
Dave
01-07-2015 07:19 AM - edited 01-07-2015 07:20 AM
Hi David,
the intensity graph can only show one plot. It's like a 3D graph limited to view from top…
But you can prepare several 2D arrays, one for each plot. Make your own plot selection and display the corresponding array in your intensity graph!
12-08-2021 07:17 AM - edited 12-08-2021 07:26 AM
Hi !
I know this thread is a bit old, but I don't think anything has changed regarding int. graphs since then.
I'm trying to train using intensity graph (in the objective of using these in a more complex way later) and I'm struggling quite a bit, probably on basic concepts:
Gerd, in your point 2, you say "Now load your data, convert XY coordinates to element index using your raster values." but how do you do so?
If I want my graph to go from -50..+50mm spaced by 0,1mm both on X and Y, but one cannot index a 2D array with anything else that unsigned integers...
In my mind, if I want to associate an intensity to a XY point, then I would need a 3D array and not 2D as the int. graph request... A XY graph with a 3rd dimension ...
But instead I'm stuck with having a 2D array where the row/colum >index< is X/Y and the value inside is Z.... How do I associate an intensity of 42,42 N on a point located at (-23,6;+49,2)?
Thanks in advance for your help.
Vinny
12-08-2021 09:04 AM
Hi Vinny,
@VinnyAstro wrote:
If I want my graph to go from -50..+50mm spaced by 0,1mm both on X and Y, but one cannot index a 2D array with anything else that unsigned integers...
You need an array of (50+50)/0.1+1 elements in X and Y direction/dimension. Then you "just" need to scale your XY coordinates to the correct index using simple math:
index = round((position+50)*10) = round((position+50)/0.1)
(Maybe add an InRangeAndCoerce to limit position (or index) to valid ranges…)
12-08-2021 09:50 AM
Hi Gerd, thanks for your reply 🙂
@GerdW wrote:
Then you "just" need to scale your XY coordinates to the correct index using simple math:
index = round((position+50)*10) = round((position+50)/0.1)(Maybe add an InRangeAndCoerce to limit position (or index) to valid ranges…)
But that will only shift my coordinates and instead of having a graph going from -50 to +50 (both in X and Y) it will go from 0 to 100... No ?
By the way, the values I'm refering to are completely random and only illustrate my question.
Typically, what if I want to represent the topography of a hill which highest point is located at the coordinates (0;0), centered on my graph, and I want to see how this hill evolve all around that point... Is it even possible to do so with an int. graph?
In a more practical use (an amplitude of movement given a frequency over movement speed for instance), I'm not even sure I would need to go in the negatives "coordinates", but I'm just confused on how to use this graph in general... And knowing how to plot data seems pretty basic and a must-know before even trying to do an FFT of a signal ...
Vinny
12-08-2021 01:02 PM
Hi Vinny,
@VinnyAstro wrote:
But that will only shift my coordinates and instead of having a graph going from -50 to +50 (both in X and Y) it will go from 0 to 100... No ?
Yes.
But you can always apply suitable scaling to the axis values in the axis properties of the graph…