Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

draw a point with scattergraph library

Hi!

I am able to draw x and y values of arrays in my graph.
Now I just want to draw a simple point in the scattergraph. I made a new plot, just with a point style (SolidDiamond).
Now I want to draw just a single point:

I think the MapPoint function is able, but I don't know the first parameter "bounds" of the rectangular? I don't have a rectangular!
this.gui_graphMessung.Plots[3].MapPoint(...,...,...)

I am also searching functions, to draw specific from one x value to another a linear straight.
Please help.

Thanks a lot,
Klaus
0 Kudos
Message 1 of 2
(3,224 Views)
You can use PlotXY to plot a single point on the ScatterGraph. There are two overloads of the PlotXY method - one that takes two double[] array parameters and one that takes two double parameters. So far you have been using the first one to plot arrays of X/Y values. The other overload takes a single X/Y value pair and should do what you're looking for.

To draw a line from one X value to another in a straight line, you can use the PlotXY method that you've been using, but make the Y values in the Y array the same. For example, to draw a straight line from X coordinate 0 to X coordinate 10 at Y Coordinate 5, you could do this:

double[] xValues = new double[] { 0, 10 };
double[] yValues = new double[] { 5, 5 };
graph.PlotXY(xValues, yValues);

- Elto
n
0 Kudos
Message 2 of 2
(3,224 Views)