The problem is that chaining together commands doesn't seem to work for the lpszCommands parameter in the DPLOT structure.
Currently, for testing, i just have my code settings all curves to the same color, but it doesn't work...
Here's the gist of the code relating to setting the lpszCommands value:
Code: Select all
// creating and zeroing out the commands variable
char *commands = new char[10000];
for(int i = 0; i < 10000; i++)
commands[i] = 0;
// inside the loop for setting the points for each curve
int clen = strlen(commands);
char addcmd[1000] = {0};
sprintf(addcmd, "[Color(%lu,255,0,0)]", DPlot->NumCurves);
strcpy(commands+clen, addcmd);
// just before returning PLUGIN_SUCCESS
fprintf(DEBUG, "%s\r\n", commands);
DPlot->lpszCommands = commands;
So why doesn't this work?[Color(1,255,0,0)][Color(2,255,0,0)][Color(3,255,0,0)][Color(4,255,0,0)][Color(5,255,0,0)][Color(6,255,0,0)][Color(7,255,0,0)][Color(8,255,0,0)][Color(9,255,0,0)][Color(10,255,0,0)]