Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

adding plots

Solved!
Go to solution
I was under the impression that if I specified a xy value on a scatter graph then that point would be displayed as a single point. this does not appear to be the case. I have tried to create a new plot but cannot find the correct method for doing this. I am new to ni ms and would appreciate some help. I am looking to produce a chart with x1y1 - x2y2 then a second plot, further along the same x axis of x3y3-x4y4.I thought I could do it on a single plot but this does not seem to be the case. I am using vb in vs2010. any help greatly appreciated....
0 Kudos
Message 1 of 3
(4,754 Views)
Solution
Accepted by topic author calydel

Hi,

 

Is this what you're looking for?

 

 

   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Try

            With ScatterPlot1

                .LineStyle = NationalInstruments.UI.LineStyle.None
                .PointStyle = NationalInstruments.UI.PointStyle.SolidDiamond
                .PointColor = Color.Lime

            End With

            With ScatterPlot2

                .LineStyle = NationalInstruments.UI.LineStyle.None
                .PointStyle = NationalInstruments.UI.PointStyle.SolidDiamond
                .PointColor = Color.Cyan

            End With

            ScatterGraph1.XAxes.Item(0).Mode = AxisMode.Fixed
            ScatterGraph1.XAxes.Item(0).Range = New Range(0, 10)

            ScatterGraph1.YAxes.Item(0).Mode = AxisMode.Fixed
            ScatterGraph1.YAxes.Item(0).Range = New Range(0, 10)

            Dim xdata(1) As Double
            Dim ydata(1) As Double

            xdata(0) = 2
            xdata(1) = 6
            ydata(0) = 2
            ydata(1) = 6
            ScatterPlot1.PlotXY(xdata, ydata)

            xdata(0) = 3
            xdata(1) = 6
            ydata(0) = 4
            ydata(1) = 9

            ScatterPlot2.PlotXY(xdata, ydata)

        Catch ex As Exception

        End Try
    End Sub

 

 

Hope this helps

 

Curt

 

0 Kudos
Message 2 of 3
(4,749 Views)
thanks for the response. Works fine.
0 Kudos
Message 3 of 3
(4,744 Views)