LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom scale intensity graph

Hello,

I'm having a problem with labview.
I want to load a custom scale for 2 axis of my intensity graph (x and y).

I got a data file witch contains for each x in combination with y an intensity. So basically it's a 2d array with for example 100 values. At the moment the graph just starts at index 0 and stops at 9 and greats a graph with as x scale 0 till 9 and same for the y scale.

I already configured the z-scale so it auto scales the intensity (max measured intensity is max intensity in graph, and mimimum intensity measured is min intensity in graph)

But I want labview to load the x-scale from disk so instead of 0 till 9 I get -> 54.3 till 90.6 for example, same counts for y. I know you can work with property nodes Xscale.range but the problem is that the increment isn't linear (first steps from 2.1 then 2.2 then 2.6 then 2.4 etc).

I'm hoping everything is clear and it's possible to solve my problem. I'm looking forward seeing the answers and I want to thank you in advance.

Tristan
0 Kudos
Message 1 of 10
(5,059 Views)
I think the answer to your question is contained in this thread

CC
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 2 of 10
(5,044 Views)
I'm not completely sure, but i don't think i can use it, ill show you an example of what i want.. i hope it makes things clear. And ofcource i hope if it can be done 😉
0 Kudos
Message 3 of 10
(5,035 Views)
I'm not sure if this fully answers your question, but you can feed in values to your intensity graph by using the XScale.MarkerVals[] property that take in arrays. You can create an array of the points you want to feed in or use the existing array values from you itensity graph. Please look at the example, it should give you a better idea.

Thank you

Nandini Subramaniam
Applications Engineering
National Instruments
0 Kudos
Message 4 of 10
(5,004 Views)
Since intensity graphs use only indexes as X and Y scales, you'll have to redefine a scale, using indexes !
The attached vi shows a way of doing it : redesigning the 2D intensity array, with an increased number of rows and columns to be able to "fake" non-uniformly spaced data.
You'll have to build a custom scale and to overlay it over the graph control, after hidding the original scale.

CC
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 5 of 10
(5,002 Views)
well nandini your example looks ok but their is one problem the scales are adjusted now but the data is still at index 0 till 10. So basicly i have to shift the data in the array but without creating new elements and i don't think that's possible?
0 Kudos
Message 6 of 10
(4,988 Views)
I just quote my previous post :
"You'll have to build a custom scale and to overlay it over the graph control, after hidding the original scale"

CC
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 7 of 10
(4,984 Views)
Thanks alot chilly charly your solution worked great!! Its very mutch appreciated!
0 Kudos
Message 8 of 10
(4,977 Views)
Yes i already did your above solution worked great, only i tested the sample included from nandini first. Then i replied at the post of nandini. Then i started looking at your included vi while you already wrote your reply, but once again tnx alot!!
0 Kudos
Message 9 of 10
(4,975 Views)
Weel, I had not seen Nandini reply since it was posted nearly at the same time as mine, and I just did a quick read to your answer, without noticing it was adressed to nandini. Thanks for the stars...

CC
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 10 of 10
(4,963 Views)