Home > Mobile > How to use the correlation function of qcpcolormap will data in a text file map into color
How to use the correlation function of qcpcolormap will data in a text file map into color
Time:10-12
I have a 0001. TXT file, in the first column is the x axis, the coordinates of the second column is the y coordinate, the third column is the size of the corresponding point of the electric field value, want to ask how great god with the related functions take the qcpcolormap TXT file data in the map into color? Equivalent to each value of the coordinates of the electric field with different colors to represent the TXT file content is roughly the following this format (can't upload attachments, so manual typing) 3 3 12 2, 3, 7.5 1 3 4.3 3 2 15 2, 2, 2.3 1 2, 3.6 3 1 14 2, 1, 8.5 1, 1, 5.2
CodePudding user response:
The elder brothers still let me answer you, I have done similar
QVector Keys and values; QStringList list=data. The split (" "); Int len=list. The length ();
//if it is not a multiple of the length to 2 minus 1 If (len % 2!=0) { Len=(len - 1); }
for (int i=0; i Keys. Append (I); }
//every two hexadecimal digits combined into a digital for (int i=0; i Qint16 value=https://bbs.csdn.net/topics/API::strHexToShort (QString (" % 1% 2 "). Arg (list) at (I)). Arg (list) at (I + 1))); Values. Append (value); }