Dear Mr. David,
I am trying to prevent that Dplot redraw plot after addition of each new curve by using PostponeRedraw() command. Please could you advice me how to correct the following code in order to get desired effect or describe where PostponeRedraw command should be placed in order to prevent intermediate redrawing?
FOR j=curvestart TO curveend
count=count+1
ret=DPlot_Command(DocNum, "[PostponeRedraw()][SelectCurve(" & STR$(j)& ")][MultipleYAxes(0,0,0)]")
ret = DPlot_AddData( DocNum, %DATA_XYXY, yalldata,J,xdata(1),dataLeft(1+yalldata*(count-1)))
DocNum=ret
NEXT
Best regards, Gorazd
PostponeRedraw
Moderator: DPlotAdmin
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Unfortunately PostponeRedraw doesn't do anything with DPlot_AddData. But since you apparently don't want the plot updated until you're done, this should work:
Unless you're plotting 100's of thousands of points, DPlot won't actually have time to hide itself. But the plot won't be updated and you should see a significant increase in performance.
Code: Select all
ret=DPlot_Command(0,"[AppHide()]")
FOR j=curvestart TO curveend
count=count+1
ret = DPlot_AddData( DocNum, %DATA_XYXY, yalldata,J,xdata(1),dataLeft(1+yalldata*(count-1)))
DocNum=ret
NEXT
ret=DPlot_Command(0,"[AppShow()]")
Visualize Your Data
support@dplot.com
support@dplot.com