I'm assuming that what you mean by "discard data" is that you expect the previous plot to disappear. If so, that is not really the purpose of the "discard data" option. Its purpose is to save memory whenever users need to plot multiple, very large plots. It does this by freeing all the memory associated with each plot, and yet leaving it on the screen. The plots will only disappear from the screen whenever something happens that causes the axis range to change (such as, for example, plotting something in autoscale mode that sets a new min/max). Or they will go away when you cover up the graph, but only if the "smooth update" option is disabled.
There are other, more obscure ways of making these discarded plots disappear from the graph, but this doesn't sound as if
it's the option you're looking for, so you shouldn't use this option to begin with. It really is only intended to save memory.
If all you want is to "replace" one plot with the next so that you have only one plot visible at a time, you have to delete the old plot first. The function is DeleteGraphPlot. You can pass the plot handle that you got back from PlotWaveform, or if you know there's only one plot in there you can pass -1. Also, if you know you're going to add another plot as soon as you delete the old one, you should pass VAL_DELAYED_DRAW as the last parameter. This avoids double drawing, which would look like flashing.
Luis
NI