Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Using CWGraph-Control to plot a surface profile shows many horizontal spikes in the plot which are not present in the raw data for this plot. Any ideas?

The CWGraph-Control is from Measurement Studio Version 6. Think it is a bug in the control. The following code is used to plot the graph:

Dim p as Long
Dim EvalValuesX as Variant
Dim EvalValuesZ as Variant
...
Me.CWGraph1.Plots.Add
p = Me.CWGraph1.Plots.Count
Me.CWGraph1.Plots(p).LineStyle = cwLineSolid
Me.CWGraph1.Plots(p).LineWidth = 1
Me.CWGraph1.Plots(p).PlotXvsY EvalValuesX, EvalValuesZ
...

I have attached two files, a PDF and an Bitmap to show what I mean.
If there are any ideas, please let me know. Thanks!

Ralf Knospe
Download All
0 Kudos
Message 1 of 7
(3,941 Views)
I think your spikes are probably the points that are displayed for each data pair. Try adding

Me.CWGraph1.Plots(p).PointStyle = cwPointNone

before calling PlotXvsY and see if that gets rid of the spikes.

Let me know if this doesn't work.

-Tony
0 Kudos
Message 2 of 7
(3,941 Views)
Hello Tony,

thanks for your answer, but the properties of the plot are set to PointStyle = None at design time. I think this is the same like the source code above. I have also tried this line of code - the result is just the same.

Ralf
0 Kudos
Message 3 of 7
(3,941 Views)
Could you please post an small example that plots some data and reproduces this problem? Thanks.

- Elton
0 Kudos
Message 4 of 7
(3,941 Views)
Hello Elton,

this problem is a part of a complex application so it is not so easy to write a small example. I will do it, but I think I can post it tomorrow. Thanks.

Ralf
0 Kudos
Message 5 of 7
(3,941 Views)
Hello Elton,

the small example is ready. I post two ZIP files, one with the source code and a text file with data (xy.txt) and the second Zip contains an installable version of the example program, because there is an additional ActiveX-DLL for reading the data.
If you run the application and then click the button you get the print with the spikes.
I have tried some printer drivers, HP5L, HP PSC750, Fax driver, pdf driver - everytime the same. The original program runs on various computers with different printers and graphic cards - the problem remains.

Sorry, but the install package is more than 2.5MB and if I try to attach it I get an error. Is it possible to e-mail it to you?

Thanks for your help.
Ralf
0 Kudos
Message 6 of 7
(3,941 Views)
Ralf,
I work in the Measurement Studio e-mail team. Would it be possible for you to send the e-mail to support@ni.com
We can take it from there.
Thanks, and have a great day.

Daniel McChane
Application Engineer
National Instruments
0 Kudos
Message 7 of 7
(3,941 Views)