View previous topic :: View next topic |
Author |
Message |
Bercic
Joined: 17 May 2004 Posts: 27 Location: Slovenia
|
Posted: Thu Sep 24, 2015 4:29 am Post subject: PostponeRedraw |
|
|
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 |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Thu Sep 24, 2015 10:08 am Post subject: |
|
|
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:
Code: | 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()]") |
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. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
Bercic
Joined: 17 May 2004 Posts: 27 Location: Slovenia
|
Posted: Thu Sep 24, 2015 2:58 pm Post subject: |
|
|
Dear David thanks for prompt response and useful information about the way how to temporary prevent »flashing« of DPlot window.
Gorazd - frequent DPlot user. I use DPlot daily for quick analysis and presentation of experimental and simulated data. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|