DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PostponeRedraw

 
Post new topic   Reply to topic    DPlot Forum Index -> Basic
View previous topic :: View next topic  
Author Message
Bercic



Joined: 17 May 2004
Posts: 27
Location: Slovenia

PostPosted: Thu Sep 24, 2015 4:29 am    Post subject: PostponeRedraw Reply with quote

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
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Thu Sep 24, 2015 10:08 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Bercic



Joined: 17 May 2004
Posts: 27
Location: Slovenia

PostPosted: Thu Sep 24, 2015 2:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Basic All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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