1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="author" content="Emanuel Eichhammer" />
<meta name="copyright" content="(C) 2013-2015 Emanuel Eichhammer" />
<title>QCPColorMapData Class Reference</title>
<link href="qt.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top">
<a class="headerLink" href="index.html">Main Page</a> ·
<a class="headerLink" href="classoverview.html">Class Overview</a> ·
<a class="headerLink" href="hierarchy.html">Hierarchy</a> ·
<a class="headerLink" href="annotated.html">All Classes</a> ·
<a class="headerLink" href="pages.html">Special Pages</a>
<!-- Generated by Doxygen 1.8.6 -->
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Functions</a> </div>
<div class="headertitle">
<div class="title">QCPColorMapData Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Holds the two-dimensional data of a <a class="el" href="classQCPColorMap.html" title="A plottable representing a two-dimensional color map in a plot. ">QCPColorMap</a> plottable.
<a href="classQCPColorMapData.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Functions</h2></td></tr>
<tr class="memitem:aac9d8eb81e18e240d89d56c01933fd23"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#aac9d8eb81e18e240d89d56c01933fd23">QCPColorMapData</a> (int keySize, int valueSize, const <a class="el" href="classQCPRange.html">QCPRange</a> &keyRange, const <a class="el" href="classQCPRange.html">QCPRange</a> &valueRange)</td></tr>
<tr class="separator:aac9d8eb81e18e240d89d56c01933fd23"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7f2145d86473263494abb9bf1de20436"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a7f2145d86473263494abb9bf1de20436">QCPColorMapData</a> (const <a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> &other)</td></tr>
<tr class="separator:a7f2145d86473263494abb9bf1de20436"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afdf4dd1b2f5714234fe84709b85c2a8d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#afdf4dd1b2f5714234fe84709b85c2a8d">operator=</a> (const <a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> &other)</td></tr>
<tr class="separator:afdf4dd1b2f5714234fe84709b85c2a8d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa8d7811686fdfea964947715210c4af8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa8d7811686fdfea964947715210c4af8"></a>
int </td><td class="memItemRight" valign="bottom"><b>keySize</b> () const </td></tr>
<tr class="separator:aa8d7811686fdfea964947715210c4af8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab880be6bc587f34e8d22fe77ef6b57e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab880be6bc587f34e8d22fe77ef6b57e9"></a>
int </td><td class="memItemRight" valign="bottom"><b>valueSize</b> () const </td></tr>
<tr class="separator:ab880be6bc587f34e8d22fe77ef6b57e9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4765180639742460f64ab6c97c745c08"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4765180639742460f64ab6c97c745c08"></a>
<a class="el" href="classQCPRange.html">QCPRange</a> </td><td class="memItemRight" valign="bottom"><b>keyRange</b> () const </td></tr>
<tr class="separator:a4765180639742460f64ab6c97c745c08"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a025be4d7ba0494fd7b38a5a56c737f2a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a025be4d7ba0494fd7b38a5a56c737f2a"></a>
<a class="el" href="classQCPRange.html">QCPRange</a> </td><td class="memItemRight" valign="bottom"><b>valueRange</b> () const </td></tr>
<tr class="separator:a025be4d7ba0494fd7b38a5a56c737f2a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9ff433248ee226ea0c469ae6cc2489fd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ff433248ee226ea0c469ae6cc2489fd"></a>
<a class="el" href="classQCPRange.html">QCPRange</a> </td><td class="memItemRight" valign="bottom"><b>dataBounds</b> () const </td></tr>
<tr class="separator:a9ff433248ee226ea0c469ae6cc2489fd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2c33807b008cdb9e1394245c294c0eaf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c33807b008cdb9e1394245c294c0eaf"></a>
double </td><td class="memItemRight" valign="bottom"><b>data</b> (double key, double value)</td></tr>
<tr class="separator:a2c33807b008cdb9e1394245c294c0eaf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af51ecd21f347adbf87b4cce4e1f5cbd6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af51ecd21f347adbf87b4cce4e1f5cbd6"></a>
double </td><td class="memItemRight" valign="bottom"><b>cell</b> (int keyIndex, int valueIndex)</td></tr>
<tr class="separator:af51ecd21f347adbf87b4cce4e1f5cbd6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0d9ff35c299d0478b682bfbcdd9c097e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize</a> (int keySize, int valueSize)</td></tr>
<tr class="separator:a0d9ff35c299d0478b682bfbcdd9c097e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac7ef70e383aface34b44dbde49234b6b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#ac7ef70e383aface34b44dbde49234b6b">setKeySize</a> (int keySize)</td></tr>
<tr class="separator:ac7ef70e383aface34b44dbde49234b6b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0893c9e3914513048b45e3429ffd16f2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a0893c9e3914513048b45e3429ffd16f2">setValueSize</a> (int valueSize)</td></tr>
<tr class="separator:a0893c9e3914513048b45e3429ffd16f2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aad9c1c7c703c1339489fc730517c83d4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#aad9c1c7c703c1339489fc730517c83d4">setRange</a> (const <a class="el" href="classQCPRange.html">QCPRange</a> &keyRange, const <a class="el" href="classQCPRange.html">QCPRange</a> &valueRange)</td></tr>
<tr class="separator:aad9c1c7c703c1339489fc730517c83d4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0738c485f3c9df9ea1241b7a8bb6a86e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a0738c485f3c9df9ea1241b7a8bb6a86e">setKeyRange</a> (const <a class="el" href="classQCPRange.html">QCPRange</a> &keyRange)</td></tr>
<tr class="separator:a0738c485f3c9df9ea1241b7a8bb6a86e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ada1b2680ba96a5f4175b6d341cf75d23"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#ada1b2680ba96a5f4175b6d341cf75d23">setValueRange</a> (const <a class="el" href="classQCPRange.html">QCPRange</a> &valueRange)</td></tr>
<tr class="separator:ada1b2680ba96a5f4175b6d341cf75d23"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afd2083ccfd6987ec94aa7ef8e91ca39a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#afd2083ccfd6987ec94aa7ef8e91ca39a">setData</a> (double key, double value, double z)</td></tr>
<tr class="separator:afd2083ccfd6987ec94aa7ef8e91ca39a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8e75eaf8746596319032a93f3d2d0683"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a8e75eaf8746596319032a93f3d2d0683">setCell</a> (int keyIndex, int valueIndex, double z)</td></tr>
<tr class="separator:a8e75eaf8746596319032a93f3d2d0683"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab235ade8a4d64bd3adb26a99b3dd57ee"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#ab235ade8a4d64bd3adb26a99b3dd57ee">recalculateDataBounds</a> ()</td></tr>
<tr class="separator:ab235ade8a4d64bd3adb26a99b3dd57ee"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9910ba830e96955bd5c8e5bef1e77ef3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a9910ba830e96955bd5c8e5bef1e77ef3">clear</a> ()</td></tr>
<tr class="separator:a9910ba830e96955bd5c8e5bef1e77ef3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a350f783260eb9b5de5c7b5e0d5d3e3c2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a350f783260eb9b5de5c7b5e0d5d3e3c2">fill</a> (double z)</td></tr>
<tr class="separator:a350f783260eb9b5de5c7b5e0d5d3e3c2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a986009324aee1fc5f696db46bd03dde5"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a986009324aee1fc5f696db46bd03dde5">isEmpty</a> () const </td></tr>
<tr class="separator:a986009324aee1fc5f696db46bd03dde5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a26e33c5ec7094b60136350bcd77d3737"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a26e33c5ec7094b60136350bcd77d3737">coordToCell</a> (double key, double value, int *keyIndex, int *valueIndex) const </td></tr>
<tr class="separator:a26e33c5ec7094b60136350bcd77d3737"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac96d6e84befe7b9951b5da6d4d4a2a47"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#ac96d6e84befe7b9951b5da6d4d4a2a47">cellToCoord</a> (int keyIndex, int valueIndex, double *key, double *value) const </td></tr>
<tr class="separator:ac96d6e84befe7b9951b5da6d4d4a2a47"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Holds the two-dimensional data of a <a class="el" href="classQCPColorMap.html" title="A plottable representing a two-dimensional color map in a plot. ">QCPColorMap</a> plottable. </p>
<p>This class is a data storage for <a class="el" href="classQCPColorMap.html">QCPColorMap</a>. It holds a two-dimensional array, which <a class="el" href="classQCPColorMap.html">QCPColorMap</a> then displays as a 2D image in the plot, where the array values are represented by a color, depending on the value.</p>
<p>The size of the array can be controlled via <a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize</a> (or <a class="el" href="classQCPColorMapData.html#ac7ef70e383aface34b44dbde49234b6b">setKeySize</a>, <a class="el" href="classQCPColorMapData.html#a0893c9e3914513048b45e3429ffd16f2">setValueSize</a>). Which plot coordinates these cells correspond to can be configured with <a class="el" href="classQCPColorMapData.html#aad9c1c7c703c1339489fc730517c83d4">setRange</a> (or <a class="el" href="classQCPColorMapData.html#a0738c485f3c9df9ea1241b7a8bb6a86e">setKeyRange</a>, <a class="el" href="classQCPColorMapData.html#ada1b2680ba96a5f4175b6d341cf75d23">setValueRange</a>).</p>
<p>The data cells can be accessed in two ways: They can be directly addressed by an integer index with <a class="el" href="classQCPColorMapData.html#a8e75eaf8746596319032a93f3d2d0683">setCell</a>. This is the fastest method. Alternatively, they can be addressed by their plot coordinate with <a class="el" href="classQCPColorMapData.html#afd2083ccfd6987ec94aa7ef8e91ca39a">setData</a>. plot coordinate to cell index transformations and vice versa are provided by the functions <a class="el" href="classQCPColorMapData.html#a26e33c5ec7094b60136350bcd77d3737">coordToCell</a> and <a class="el" href="classQCPColorMapData.html#ac96d6e84befe7b9951b5da6d4d4a2a47">cellToCoord</a>.</p>
<p>This class also buffers the minimum and maximum values that are in the data set, to provide <a class="el" href="classQCPColorMap.html#a856608fa3dd1cc290bcd5f29a5575774">QCPColorMap::rescaleDataRange</a> with the necessary information quickly. Setting a cell to a value that is greater than the current maximum increases this maximum to the new value. However, setting the cell that currently holds the maximum value to a smaller value doesn't decrease the maximum again, because finding the true new maximum would require going through the entire data array, which might be time consuming. The same holds for the data minimum. This functionality is given by <a class="el" href="classQCPColorMapData.html#ab235ade8a4d64bd3adb26a99b3dd57ee">recalculateDataBounds</a>, such that you can decide when it is sensible to find the true current minimum and maximum. The method <a class="el" href="classQCPColorMap.html#a856608fa3dd1cc290bcd5f29a5575774">QCPColorMap::rescaleDataRange</a> offers a convenience parameter <em>recalculateDataBounds</em> which may be set to true to automatically call <a class="el" href="classQCPColorMapData.html#ab235ade8a4d64bd3adb26a99b3dd57ee">recalculateDataBounds</a> internally. </p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="aac9d8eb81e18e240d89d56c01933fd23"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">QCPColorMapData::QCPColorMapData </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>keySize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>valueSize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classQCPRange.html">QCPRange</a> & </td>
<td class="paramname"><em>keyRange</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classQCPRange.html">QCPRange</a> & </td>
<td class="paramname"><em>valueRange</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a new <a class="el" href="classQCPColorMapData.html" title="Holds the two-dimensional data of a QCPColorMap plottable. ">QCPColorMapData</a> instance. The instance has <em>keySize</em> cells in the key direction and <em>valueSize</em> cells in the value direction. These cells will be displayed by the <a class="el" href="classQCPColorMap.html">QCPColorMap</a> at the coordinates <em>keyRange</em> and <em>valueRange</em>.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize</a>, <a class="el" href="classQCPColorMapData.html#ac7ef70e383aface34b44dbde49234b6b">setKeySize</a>, <a class="el" href="classQCPColorMapData.html#a0893c9e3914513048b45e3429ffd16f2">setValueSize</a>, <a class="el" href="classQCPColorMapData.html#aad9c1c7c703c1339489fc730517c83d4">setRange</a>, <a class="el" href="classQCPColorMapData.html#a0738c485f3c9df9ea1241b7a8bb6a86e">setKeyRange</a>, <a class="el" href="classQCPColorMapData.html#ada1b2680ba96a5f4175b6d341cf75d23">setValueRange</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a7f2145d86473263494abb9bf1de20436"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">QCPColorMapData::QCPColorMapData </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> & </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a new <a class="el" href="classQCPColorMapData.html" title="Holds the two-dimensional data of a QCPColorMap plottable. ">QCPColorMapData</a> instance copying the data and range of <em>other</em>. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="afdf4dd1b2f5714234fe84709b85c2a8d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> & QCPColorMapData::operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> & </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Overwrites this color map data instance with the data stored in <em>other</em>. </p>
</div>
</div>
<a class="anchor" id="a0d9ff35c299d0478b682bfbcdd9c097e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::setSize </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>keySize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>valueSize</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Resizes the data array to have <em>keySize</em> cells in the key dimension and <em>valueSize</em> cells in the value dimension.</p>
<p>The current data is discarded and the map cells are set to 0, unless the map had already the requested size.</p>
<p>Setting at least one of <em>keySize</em> or <em>valueSize</em> to zero frees the internal data array and <a class="el" href="classQCPColorMapData.html#a986009324aee1fc5f696db46bd03dde5">isEmpty</a> returns true.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorMapData.html#aad9c1c7c703c1339489fc730517c83d4">setRange</a>, <a class="el" href="classQCPColorMapData.html#ac7ef70e383aface34b44dbde49234b6b">setKeySize</a>, <a class="el" href="classQCPColorMapData.html#a0893c9e3914513048b45e3429ffd16f2">setValueSize</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ac7ef70e383aface34b44dbde49234b6b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::setKeySize </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>keySize</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Resizes the data array to have <em>keySize</em> cells in the key dimension.</p>
<p>The current data is discarded and the map cells are set to 0, unless the map had already the requested size.</p>
<p>Setting <em>keySize</em> to zero frees the internal data array and <a class="el" href="classQCPColorMapData.html#a986009324aee1fc5f696db46bd03dde5">isEmpty</a> returns true.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorMapData.html#a0738c485f3c9df9ea1241b7a8bb6a86e">setKeyRange</a>, <a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize</a>, <a class="el" href="classQCPColorMapData.html#a0893c9e3914513048b45e3429ffd16f2">setValueSize</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a0893c9e3914513048b45e3429ffd16f2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::setValueSize </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>valueSize</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Resizes the data array to have <em>valueSize</em> cells in the value dimension.</p>
<p>The current data is discarded and the map cells are set to 0, unless the map had already the requested size.</p>
<p>Setting <em>valueSize</em> to zero frees the internal data array and <a class="el" href="classQCPColorMapData.html#a986009324aee1fc5f696db46bd03dde5">isEmpty</a> returns true.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorMapData.html#ada1b2680ba96a5f4175b6d341cf75d23">setValueRange</a>, <a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize</a>, <a class="el" href="classQCPColorMapData.html#ac7ef70e383aface34b44dbde49234b6b">setKeySize</a> </dd></dl>
</div>
</div>
<a class="anchor" id="aad9c1c7c703c1339489fc730517c83d4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::setRange </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classQCPRange.html">QCPRange</a> & </td>
<td class="paramname"><em>keyRange</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classQCPRange.html">QCPRange</a> & </td>
<td class="paramname"><em>valueRange</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the coordinate ranges the data shall be distributed over. This defines the rectangular area covered by the color map in plot coordinates.</p>
<p>The outer cells will be centered on the range boundaries given to this function. For example, if the key size (<a class="el" href="classQCPColorMapData.html#ac7ef70e383aface34b44dbde49234b6b">setKeySize</a>) is 3 and <em>keyRange</em> is set to <code><a class="el" href="classQCPRange.html" title="Represents the range an axis is encompassing. ">QCPRange(2, 3)</a></code> there will be cells centered on the key coordinates 2, 2.5 and 3.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a0738c485f3c9df9ea1241b7a8bb6a86e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::setKeyRange </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classQCPRange.html">QCPRange</a> & </td>
<td class="paramname"><em>keyRange</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the coordinate range the data shall be distributed over in the key dimension. Together with the value range, This defines the rectangular area covered by the color map in plot coordinates.</p>
<p>The outer cells will be centered on the range boundaries given to this function. For example, if the key size (<a class="el" href="classQCPColorMapData.html#ac7ef70e383aface34b44dbde49234b6b">setKeySize</a>) is 3 and <em>keyRange</em> is set to <code><a class="el" href="classQCPRange.html" title="Represents the range an axis is encompassing. ">QCPRange(2, 3)</a></code> there will be cells centered on the key coordinates 2, 2.5 and 3.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorMapData.html#aad9c1c7c703c1339489fc730517c83d4">setRange</a>, <a class="el" href="classQCPColorMapData.html#ada1b2680ba96a5f4175b6d341cf75d23">setValueRange</a>, <a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ada1b2680ba96a5f4175b6d341cf75d23"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::setValueRange </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classQCPRange.html">QCPRange</a> & </td>
<td class="paramname"><em>valueRange</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the coordinate range the data shall be distributed over in the value dimension. Together with the key range, This defines the rectangular area covered by the color map in plot coordinates.</p>
<p>The outer cells will be centered on the range boundaries given to this function. For example, if the value size (<a class="el" href="classQCPColorMapData.html#a0893c9e3914513048b45e3429ffd16f2">setValueSize</a>) is 3 and <em>valueRange</em> is set to <code><a class="el" href="classQCPRange.html" title="Represents the range an axis is encompassing. ">QCPRange(2, 3)</a></code> there will be cells centered on the value coordinates 2, 2.5 and 3.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorMapData.html#aad9c1c7c703c1339489fc730517c83d4">setRange</a>, <a class="el" href="classQCPColorMapData.html#a0738c485f3c9df9ea1241b7a8bb6a86e">setKeyRange</a>, <a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize</a> </dd></dl>
</div>
</div>
<a class="anchor" id="afd2083ccfd6987ec94aa7ef8e91ca39a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::setData </td>
<td>(</td>
<td class="paramtype">double </td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>z</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the data of the cell, which lies at the plot coordinates given by <em>key</em> and <em>value</em>, to <em>z</em>.</p>
<dl class="section note"><dt>Note</dt><dd>The <a class="el" href="classQCPColorMap.html" title="A plottable representing a two-dimensional color map in a plot. ">QCPColorMap</a> always displays the data at equal key/value intervals, even if the key or value axis is set to a logarithmic scaling. If you want to use <a class="el" href="classQCPColorMap.html" title="A plottable representing a two-dimensional color map in a plot. ">QCPColorMap</a> with logarithmic axes, you shouldn't use the <a class="el" href="classQCPColorMapData.html#afd2083ccfd6987ec94aa7ef8e91ca39a">QCPColorMapData::setData</a> method as it uses a linear transformation to determine the cell index. Rather directly access the cell index with <a class="el" href="classQCPColorMapData.html#a8e75eaf8746596319032a93f3d2d0683">QCPColorMapData::setCell</a>.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorMapData.html#a8e75eaf8746596319032a93f3d2d0683">setCell</a>, <a class="el" href="classQCPColorMapData.html#aad9c1c7c703c1339489fc730517c83d4">setRange</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a8e75eaf8746596319032a93f3d2d0683"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::setCell </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>keyIndex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>valueIndex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>z</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the data of the cell with indices <em>keyIndex</em> and <em>valueIndex</em> to <em>z</em>. The indices enumerate the cells starting from zero, up to the map's size-1 in the respective dimension (see <a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize</a>).</p>
<p>In the standard plot configuration (horizontal key axis and vertical value axis, both not range-reversed), the cell with indices (0, 0) is in the bottom left corner and the cell with indices (keySize-1, valueSize-1) is in the top right corner of the color map.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorMapData.html#afd2083ccfd6987ec94aa7ef8e91ca39a">setData</a>, <a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ab235ade8a4d64bd3adb26a99b3dd57ee"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::recalculateDataBounds </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Goes through the data and updates the buffered minimum and maximum data values.</p>
<p>Calling this method is only advised if you are about to call <a class="el" href="classQCPColorMap.html#a856608fa3dd1cc290bcd5f29a5575774">QCPColorMap::rescaleDataRange</a> and can not guarantee that the cells holding the maximum or minimum data haven't been overwritten with a smaller or larger value respectively, since the buffered maximum/minimum values have been updated the last time. Why this is the case is explained in the class description (<a class="el" href="classQCPColorMapData.html">QCPColorMapData</a>).</p>
<p>Note that the method <a class="el" href="classQCPColorMap.html#a856608fa3dd1cc290bcd5f29a5575774">QCPColorMap::rescaleDataRange</a> provides a parameter <em>recalculateDataBounds</em> for convenience. Setting this to true will call this method for you, before doing the rescale. </p>
</div>
</div>
<a class="anchor" id="a9910ba830e96955bd5c8e5bef1e77ef3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::clear </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Frees the internal data memory.</p>
<p>This is equivalent to calling <a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize(0, 0)</a>. </p>
</div>
</div>
<a class="anchor" id="a350f783260eb9b5de5c7b5e0d5d3e3c2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::fill </td>
<td>(</td>
<td class="paramtype">double </td>
<td class="paramname"><em>z</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets all cells to the value <em>z</em>. </p>
</div>
</div>
<a class="anchor" id="a986009324aee1fc5f696db46bd03dde5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool QCPColorMapData::isEmpty </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns whether this instance carries no data. This is equivalent to having a size where at least one of the dimensions is 0 (see <a class="el" href="classQCPColorMapData.html#a0d9ff35c299d0478b682bfbcdd9c097e">setSize</a>). </p>
</div>
</div>
<a class="anchor" id="a26e33c5ec7094b60136350bcd77d3737"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::coordToCell </td>
<td>(</td>
<td class="paramtype">double </td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"><em>keyIndex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"><em>valueIndex</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Transforms plot coordinates given by <em>key</em> and <em>value</em> to cell indices of this <a class="el" href="classQCPColorMapData.html" title="Holds the two-dimensional data of a QCPColorMap plottable. ">QCPColorMapData</a> instance. The resulting cell indices are returned via the output parameters <em>keyIndex</em> and <em>valueIndex</em>.</p>
<p>The retrieved key/value cell indices can then be used for example with <a class="el" href="classQCPColorMapData.html#a8e75eaf8746596319032a93f3d2d0683">setCell</a>.</p>
<p>If you are only interested in a key or value index, you may pass 0 as <em>valueIndex</em> or <em>keyIndex</em>.</p>
<dl class="section note"><dt>Note</dt><dd>The <a class="el" href="classQCPColorMap.html" title="A plottable representing a two-dimensional color map in a plot. ">QCPColorMap</a> always displays the data at equal key/value intervals, even if the key or value axis is set to a logarithmic scaling. If you want to use <a class="el" href="classQCPColorMap.html" title="A plottable representing a two-dimensional color map in a plot. ">QCPColorMap</a> with logarithmic axes, you shouldn't use the <a class="el" href="classQCPColorMapData.html#a26e33c5ec7094b60136350bcd77d3737">QCPColorMapData::coordToCell</a> method as it uses a linear transformation to determine the cell index.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorMapData.html#ac96d6e84befe7b9951b5da6d4d4a2a47">cellToCoord</a>, <a class="el" href="classQCPAxis.html#a985ae693b842fb0422b4390fe36d299a">QCPAxis::coordToPixel</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ac96d6e84befe7b9951b5da6d4d4a2a47"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPColorMapData::cellToCoord </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>keyIndex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>valueIndex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double * </td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double * </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Transforms cell indices given by <em>keyIndex</em> and <em>valueIndex</em> to cell indices of this <a class="el" href="classQCPColorMapData.html" title="Holds the two-dimensional data of a QCPColorMap plottable. ">QCPColorMapData</a> instance. The resulting coordinates are returned via the output parameters <em>key</em> and <em>value</em>.</p>
<p>If you are only interested in a key or value coordinate, you may pass 0 as <em>key</em> or <em>value</em>.</p>
<dl class="section note"><dt>Note</dt><dd>The <a class="el" href="classQCPColorMap.html" title="A plottable representing a two-dimensional color map in a plot. ">QCPColorMap</a> always displays the data at equal key/value intervals, even if the key or value axis is set to a logarithmic scaling. If you want to use <a class="el" href="classQCPColorMap.html" title="A plottable representing a two-dimensional color map in a plot. ">QCPColorMap</a> with logarithmic axes, you shouldn't use the <a class="el" href="classQCPColorMapData.html#ac96d6e84befe7b9951b5da6d4d4a2a47">QCPColorMapData::cellToCoord</a> method as it uses a linear transformation to determine the cell index.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorMapData.html#a26e33c5ec7094b60136350bcd77d3737">coordToCell</a>, <a class="el" href="classQCPAxis.html#ae9289ef7043b9d966af88eaa95b037d1">QCPAxis::pixelToCoord</a> </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/plottables/plottable-colormap.h</li>
<li>src/plottables/plottable-colormap.cpp</li>
</ul>
</div><!-- contents -->
</body>
</html>
|