View previous topic :: View next topic |
Author |
Message |
ledo
Joined: 17 Mar 2006 Posts: 2
|
Posted: Fri Mar 17, 2006 3:27 am Post subject: a bug? addata with array larger than 1024 |
|
|
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 |
|
|
ledo
Joined: 17 Mar 2006 Posts: 2
|
Posted: Fri Mar 17, 2006 5:44 am Post subject: Solution |
|
|
Hi, found the solution already,
adding:
updateDocNum(dPlot_Command(0, "[FileArrays(10,100000)"));
did the trick! |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Fri Mar 17, 2006 10:26 am Post subject: |
|
|
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 |
|
|
|
|
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
|