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 

a bug? addata with array larger than 1024

 
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
ledo



Joined: 17 Mar 2006
Posts: 2

PostPosted: Fri Mar 17, 2006 3:27 am    Post subject: a bug? addata with array larger than 1024 Reply with quote

Hello, i encountered a problem when plotting an xy plot from 2 arrays with the adddata command (latest version of dplot trial & jr).

When i plot arrays of size 1024 it works, 1025 and above it fails (generic error 0).

I tried to follow the example of ctest3 which also uses adddata. I want to use addata because i'd like to plot arrays of sizes like 100000. Test3 tells me that this is the most efficient method to use.

Should I initialize dplot first? Ifso, how?
Should I use dplot_plot first? Ifso, why isn't this done in the example?

Thanks in advance for any help.


Some samplecode (used for MSVC++ 6):


dplotDocNum = dPlot_Command(0, "[FileNew()]");

int const aSize = 1025; //fails, 1024 works
double test1[aSize];
double test2[aSize];

for (int i=0; i<aSize;i++) {
test1[i]=i;
test2[i]=0;
}

DPlot_AddData8(dplotDocNum, DATA_XYXY, aSize, 0, test1, test2));
Back to top
View user's profile Send private message
ledo



Joined: 17 Mar 2006
Posts: 2

PostPosted: Fri Mar 17, 2006 5:44 am    Post subject: Solution Reply with quote

Hi, found the solution already,

adding:
updateDocNum(dPlot_Command(0, "[FileArrays(10,100000)"));
did the trick!
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


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

PostPosted: Fri Mar 17, 2006 10:26 am    Post subject: Reply with quote

I'm glad you figured it out for yourself. If you have any more problems please let me know.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports 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