If you already have the vector of points in memory why aren't you just using them as-is? Seems you are writing a file only to transform the data.
If you already have the vector of points in memory why aren't you just using them as-is? Seems you are writing a file only to transform the data.
Firstly, I parse xml file and after calculating points for plotting graph, i save those points to binary file so it can be easier to load them later without parsing xml again.
Problem is, that data can be added to plotting function as two vectors of doubles, one vector for x, other for y coordinate.
This is the function i use: void QCPGraph::addData ( const QVector< double > & keys, const QVector< double > & values ) from QCustomPlot library
so parse the file into memory in convenient format - and KEEP it in memory. File access is very slow!
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
Bookmarks