Showing results for 
Search instead for 
Did you mean: 

How to insert data points into a x-y graph line per mouse?



My latest version of Labview is only 2013.

I want to create a waveform-table creator, that creates a waveform table with 120 hex values.

The values should be created from a graph line (x-y graph). Data points should be inserted in the line by clicking

with the mouse on the position on the line. The line should be changed by dragging the data points per mouse.

When the graph line has the form that is wanted, the y-values should be saved in an array of 120 values (x-values of the graph) in hex values.

So the number of x-values in the x-y graph are 120. And the maximum number of insertable Data points are also 120.

The maximum value of the y-values should be 0xff (255).

How can i realize the further steps?

How can i insert data ponts and manipulate the line by dragging these inserted data points?

Thank you in advance for any help.

Please remeber i have only Labview Developer Edition version 2013.


with kind regards


0 Kudos
Message 1 of 4

There are mouse down events that report the position that you can convert to graph units. and then update the desired output array.


How far did you get? What kind of interpolation do you want between points (linear? Spline? etc.)? Are you allowed to move points in x and y or only y? Should the x values be quantized to whole numbers? What about the y values? What should happen if the points are no longer sorted in x?


Since the x values will be equally spaced (120 points), maybe all you really need is a waveform (not xy) graph.

I would make sure the graph has exactly 120x255 pixels.


An another option would be to have an array of 120 vertical U8 sliders.

0 Kudos
Message 2 of 4

Hello altenbach,

thank you for your ideas.

I'm not very far with it. I created the waveform tables only with the help from excel.

(sine, square, sawtooth, reverse sawtooth)

But now i want to create customized waveforms with the graphical help from Labview.

The idea of 120 sliders is the easiest one, but also with the most effort.


For the graph line the interpolation should be linear.

Yes, the x axis represent the number of values in a definite order for the array of the wavetable. So there should be no values between the 120 values.

And so it is only allowed to move the points in y.

on the y axis there are values from 0 to 255 (hex: 0x00 to 0xff).

So when you click on the graph line it should be only allowed to insert a datapoint on the crosspoint of the y values 0 to 255 and the x values 0 to 119.


But i'm also interested how to realize it to move points in x and y.

I have never seen it before in Labview, but a lot of in other programs, where you can

insert nodes (data points on a line graph) and drag the nodes, so that the values in an array are changed also.

Are there examples of this in Labview anywhere? (Please remember i have only Labview 2013)



0 Kudos
Message 3 of 4

@emann wrote:

Hello altenbach,

The idea of 120 sliders is the easiest one, but also with the most effort.

If it requires effort, it cannot be easy right? However it does not require any effort. Just drop a narrow slides (no visible scale) into an array container and resize for 120 sliders.


For the xy graph, you need to decide if a click should insert a new point or grab the nearest already inserted point to be moved. There are plenty of examples.


@emann wrote:

I created the waveform tables only with the help from excel.

(sine, square, sawtooth, reverse sawtooth)

You definitely don't need excel for any of that!

0 Kudos
Message 4 of 4