LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph response slows with dashed plot

I have an xy graph displaying multiple plots. I find that if at least one of the plots uses a dashed line as the line type, and that this plot has zero values displayed, then the response of the graph slows significantly. Redraws seem to take 5 to 10 times longer and cpu utilization goes way up. If I scroll the plot such that the zero values go past the endpoint of the x-axis, then the normal response returns. The effect gets worse with the number of dashed plots containing zero values, but seems independent of the number of zero values. Has anybody else seen this?
0 Kudos
Message 1 of 6
(2,400 Views)
If I assume that you use Windows then it might possibly be your graphics card / acceleration settings.

That does not imply that this is the answer, merely a possibility. The way Windows works, the graphics handling that is not done by a display card is handled by the Operating System. So you can see a big drop in performance with some types of graphics handling, depending on the acceleration characteristics of the graphics card.
0 Kudos
Message 2 of 6
(2,389 Views)
Your question is a bit confusing. Do you mean (1) all values are zero or (2) the number of points is zero for a particular graph?

How many points are on your graph? What is the linewidth? Do you have "Antialias" enabled?

Could you attach a simplified example?
0 Kudos
Message 3 of 6
(2,385 Views)
Since you asked so many good questions, I went back and took a harder look at the situation and I think I figured it out. I am capturing and displaying instrument data continuously as a function of time. I feed my chart with large pre-initialized (with zeros) arrays that are incrementally filled with real data from the last element forward, so that the plot line does not zoom off to the right from the last point. The x-axis is date/time. The tradeoff then is that the data to the left starts at date=0 (until the array fills). The issue is not actually that I am displaying y-values of zero as I thought at first, but that if the window on the time axis is such that the first real data point is displayed, then the plot line extends from this value left to time=0, which is a long way. Labview needs to actually compute this line to properly display the line segment from 0,0 to the first data point, but only if the first point is displayed. I think Labview has a quick method of doing this for a solid line, but that for a dashed line, it needs to compute each little dash segment and it bogs down. As it turns out, this situation will happen very seldom and I can ignore the whole issue. Thanks for the help -
0 Kudos
Message 4 of 6
(2,380 Views)
Just another tip that might also help:
Initialize you array with NaNs instead of zeroes. Points containing NaN are not graphed at all!
0 Kudos
Message 5 of 6
(2,374 Views)
I'm going to try that. If it works, it will also solve some other performance issues I have been living with. For instance loading the arrays from the rear means I have to rotate them every time I add a point. This is required anyway during normal operation as I need to keep only the last n-points and need to dospose of the first one (and it happens only a few time a minute), but at atartup it reloads many megabytes worth of data one point at a time and the rotating slows the startup process to a crawl. Thanks for the tip -
0 Kudos
Message 6 of 6
(2,367 Views)