May be the problem was not clearly stated. I was not reading the values corresponding to the sinus curve inside coordinates. For some reason it seems that the data become available in coordinates only after a replot. May be some one can discuss what happens behind the scenes...
For me it was sufficient to do this:
double *xSin = new double[size];
double *ySin = new double[size];
for(int i = 0; i < size; i++){ /* Gera pontos do seno. */
xSin[i] = i;
ySin[i] = ::sin(i);
}
double *xSin = new double[size];
double *ySin = new double[size];
for(int i = 0; i < size; i++){ /* Gera pontos do seno. */
xSin[i] = i;
ySin[i] = ::sin(i);
}
To copy to clipboard, switch view to plain text mode
Bookmarks