04-07-2022 12:09 AM
Hello,
I hope you are doing well.
I am working on developing horizontal resistance/strain test rig and so I want to plot Resistance vs Length graph in XY Graph. But every time my graph is starting from highest to lowest x-axis values like if I set 5mm length to start from, then it goes as from 5 to 0. I have tried to add negative function in sketching and also set to invert x-axis from properties of XY graph, but I am not getting desired output; I want to see my plot should start from 0 to highest one value.
For you information, I am using remaining steps output from StepperToGo.vi (LabView Interfacing with Arduino) block for x-axis. I know its output values are decreasing so causing my plot starting from highest to lowest.
Kindly suggest.
Solved! Go to Solution.
04-07-2022 09:50 AM
Hi Afza,
@Afzal6khan wrote:
I want to plot Resistance vs Length graph in XY Graph. … I want to see my plot should start from 0 to highest one value.
For you information, I am using remaining steps output from StepperToGo.vi (LabView Interfacing with Arduino) block for x-axis. I know its output values are decreasing so causing my plot starting from highest to lowest.
So you know your X values start with a larger value and decrease to the end of the measurement. And you wonder why the XY graph starts to plot at larger X values and finishes with smaller X values!?
Why don't you scale your X values, like this:
x_scaled := x_max - x_remaining
Seems rather trivial…
04-12-2022 09:33 AM
@Afzal6khan wrote:
I am working on developing horizontal resistance/strain test rig and so I want to plot Resistance vs Length graph in XY Graph. But every time my graph is starting from highest to lowest x-axis values like if I set 5mm length to start from, then it goes as from 5 to 0. I have tried to add negative function in sketching and also set to invert x-axis from properties of XY graph, but I am not getting desired output; I want to see my plot should start from 0 to highest one value..
Sorry, I don't quite understand your questions. Maybe you could add a picture showing what you gets vs what you want.
If you want the x-axis inverted (i.e. highest value on the left) just set it in the properties:
04-12-2022 11:22 AM
Am I correct that you are plotting an XY Graph, whose inputs consist of an Array of Clusters of 2 elements, X and Y? And the Graph plots from highest value of X to lowest? Have you looked at the Array? Is the first value the highest, and the last value the lowest?
If so, what operation (on the data, the Array of Clusters) do you think you need to perform to get the first value the lowest? Do you know how to program this operation? Where would you look (in the Block Diagram Palette) for such an operation?
Bob Schor
04-12-2022 01:01 PM
Oh man! Thank you. I just needed to focus on that basic logical maths. I have sorted out.