Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I plot multiple plots on a graph when each plot has a different set of x values using Measurement Studio

All information I have found to date talks about plotting multiple graphs each of which has the same set of x values. I am plotting 3 plots each of which has a different set of x values.
0 Kudos
Message 1 of 7
(4,210 Views)
You would need to use the PlotXY method on each plot object. Something like:

CWGraph1.Plots(1).PlotXvsY xData1, YData1
CWGraph1.Plots(2).PlotXvsY xData2, YData2
CWGraph1.Plots(3).PlotXvsY xData2, YData2
...

Best Regards,

Chris Matthews
National Instruments
Message 2 of 7
(4,210 Views)
I have already tried this and I get an error message when it tries to execute the line of code that generates the second plot..."invalid index". Any thoughts?
0 Kudos
Message 3 of 7
(4,210 Views)
I added a plot to the collection cwgraph1.plots.add and I was able to get by the index error but the 1st plot is cleared when the second one is plotted. How can I get the 3 plots on the graph at the same time?
0 Kudos
Message 4 of 7
(4,210 Views)
I'm not sure why you are having problems. It works fine for me. Here is the project I used. I'm using Measurement Studio 6.0.

Chris
0 Kudos
Message 5 of 7
(4,210 Views)
Chris's example works fine. Is there any way we can add second X Axis? just like we do that for Y Axis. The reason to use that is I want to display two sets of data (They have different X values for two channels.) with their individual X scale in the entire plot area. Is it possible,chris? Thanks
0 Kudos
Message 6 of 7
(4,210 Views)
No, currently only multiple Y Axis are supported. I'll relay your request to our developers. You could probably mimic a second axis with a slide control.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 7 of 7
(4,210 Views)