File: classQCPColorMapData.html

package info (click to toggle)
qcustomplot 2.0.1%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,376 kB
  • sloc: cpp: 21,746; sh: 180; makefile: 2
file content (730 lines) | stat: -rw-r--r-- 51,567 bytes parent folder | download | duplicates (2)
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
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
<!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) 2011-2016 Emanuel Eichhammer" />
<title>QCPColorMapData Class Reference</title>
<link href="qcp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top">
<a class="headerLink"  href="index.html">Main Page</a> &middot;
<a class="headerLink"  href="classoverview.html">Class Overview</a> &middot;
<a class="headerLink"  href="hierarchy.html">Hierarchy</a> &middot;
<a class="headerLink"  href="annotated.html">All Classes</a> &middot;
<a class="headerLink"  href="pages.html">Special Pages</a>
<!-- Generated by Doxygen 1.8.12 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Functions</a> &#124;
<a href="#pro-methods">Protected 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">&#160;</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> &amp;keyRange, const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;valueRange)</td></tr>
<tr class="separator:aac9d8eb81e18e240d89d56c01933fd23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f2145d86473263494abb9bf1de20436"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a7f2145d86473263494abb9bf1de20436">QCPColorMapData</a> (const <a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> &amp;other)</td></tr>
<tr class="separator:a7f2145d86473263494abb9bf1de20436"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdf4dd1b2f5714234fe84709b85c2a8d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#afdf4dd1b2f5714234fe84709b85c2a8d">operator=</a> (const <a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> &amp;other)</td></tr>
<tr class="separator:afdf4dd1b2f5714234fe84709b85c2a8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbda4d28de97aedce1e6e6f008a0a1f7"><td class="memItemLeft" align="right" valign="top"><a id="abbda4d28de97aedce1e6e6f008a0a1f7"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>keySize</b> () const</td></tr>
<tr class="separator:abbda4d28de97aedce1e6e6f008a0a1f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8510cafea24645bbb62b5e0bfc43209f"><td class="memItemLeft" align="right" valign="top"><a id="a8510cafea24645bbb62b5e0bfc43209f"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>valueSize</b> () const</td></tr>
<tr class="separator:a8510cafea24645bbb62b5e0bfc43209f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e43abd20a77b922b7cecfc69bf4dad7"><td class="memItemLeft" align="right" valign="top"><a id="a1e43abd20a77b922b7cecfc69bf4dad7"></a>
<a class="el" href="classQCPRange.html">QCPRange</a>&#160;</td><td class="memItemRight" valign="bottom"><b>keyRange</b> () const</td></tr>
<tr class="separator:a1e43abd20a77b922b7cecfc69bf4dad7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a818e4e384aa4e5fad69ac603924394d3"><td class="memItemLeft" align="right" valign="top"><a id="a818e4e384aa4e5fad69ac603924394d3"></a>
<a class="el" href="classQCPRange.html">QCPRange</a>&#160;</td><td class="memItemRight" valign="bottom"><b>valueRange</b> () const</td></tr>
<tr class="separator:a818e4e384aa4e5fad69ac603924394d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7620248272c5ddd9a3f877f07179f6d"><td class="memItemLeft" align="right" valign="top"><a id="ab7620248272c5ddd9a3f877f07179f6d"></a>
<a class="el" href="classQCPRange.html">QCPRange</a>&#160;</td><td class="memItemRight" valign="bottom"><b>dataBounds</b> () const</td></tr>
<tr class="separator:ab7620248272c5ddd9a3f877f07179f6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c33807b008cdb9e1394245c294c0eaf"><td class="memItemLeft" align="right" valign="top"><a id="a2c33807b008cdb9e1394245c294c0eaf"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>data</b> (double key, double value)</td></tr>
<tr class="separator:a2c33807b008cdb9e1394245c294c0eaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af51ecd21f347adbf87b4cce4e1f5cbd6"><td class="memItemLeft" align="right" valign="top"><a id="af51ecd21f347adbf87b4cce4e1f5cbd6"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>cell</b> (int keyIndex, int valueIndex)</td></tr>
<tr class="separator:af51ecd21f347adbf87b4cce4e1f5cbd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f7e6b7a97017400cbbd46f0660e68ea"><td class="memItemLeft" align="right" valign="top">unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a4f7e6b7a97017400cbbd46f0660e68ea">alpha</a> (int keyIndex, int valueIndex)</td></tr>
<tr class="separator:a4f7e6b7a97017400cbbd46f0660e68ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d9ff35c299d0478b682bfbcdd9c097e"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</td></tr>
<tr class="memitem:ac7ef70e383aface34b44dbde49234b6b"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</td></tr>
<tr class="memitem:a0893c9e3914513048b45e3429ffd16f2"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</td></tr>
<tr class="memitem:aad9c1c7c703c1339489fc730517c83d4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#aad9c1c7c703c1339489fc730517c83d4">setRange</a> (const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;keyRange, const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;valueRange)</td></tr>
<tr class="separator:aad9c1c7c703c1339489fc730517c83d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0738c485f3c9df9ea1241b7a8bb6a86e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a0738c485f3c9df9ea1241b7a8bb6a86e">setKeyRange</a> (const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;keyRange)</td></tr>
<tr class="separator:a0738c485f3c9df9ea1241b7a8bb6a86e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada1b2680ba96a5f4175b6d341cf75d23"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#ada1b2680ba96a5f4175b6d341cf75d23">setValueRange</a> (const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;valueRange)</td></tr>
<tr class="separator:ada1b2680ba96a5f4175b6d341cf75d23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd2083ccfd6987ec94aa7ef8e91ca39a"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</td></tr>
<tr class="memitem:a8e75eaf8746596319032a93f3d2d0683"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</td></tr>
<tr class="memitem:aaf7de5b34c58f38d8f4c1ceb064a876c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#aaf7de5b34c58f38d8f4c1ceb064a876c">setAlpha</a> (int keyIndex, int valueIndex, unsigned char <a class="el" href="classQCPColorMapData.html#a4f7e6b7a97017400cbbd46f0660e68ea">alpha</a>)</td></tr>
<tr class="separator:aaf7de5b34c58f38d8f4c1ceb064a876c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab235ade8a4d64bd3adb26a99b3dd57ee"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</td></tr>
<tr class="memitem:a9910ba830e96955bd5c8e5bef1e77ef3"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</td></tr>
<tr class="memitem:a14d08b9c3720cd719400079b86d3906b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a14d08b9c3720cd719400079b86d3906b">clearAlpha</a> ()</td></tr>
<tr class="separator:a14d08b9c3720cd719400079b86d3906b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a350f783260eb9b5de5c7b5e0d5d3e3c2"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</td></tr>
<tr class="memitem:a93e2a549d7702bc849cd48a585294657"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a93e2a549d7702bc849cd48a585294657">fillAlpha</a> (unsigned char <a class="el" href="classQCPColorMapData.html#a4f7e6b7a97017400cbbd46f0660e68ea">alpha</a>)</td></tr>
<tr class="separator:a93e2a549d7702bc849cd48a585294657"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea88cc75a76ca571acf29b2ba8ac970d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#aea88cc75a76ca571acf29b2ba8ac970d">isEmpty</a> () const</td></tr>
<tr class="separator:aea88cc75a76ca571acf29b2ba8ac970d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca5b29e0ca2f299c9060fc6e1f74d0c8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#aca5b29e0ca2f299c9060fc6e1f74d0c8">coordToCell</a> (double key, double value, int *keyIndex, int *valueIndex) const</td></tr>
<tr class="separator:aca5b29e0ca2f299c9060fc6e1f74d0c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1a36385c78ab624cd617065602408b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#af1a36385c78ab624cd617065602408b6">cellToCoord</a> (int keyIndex, int valueIndex, double *key, double *value) const</td></tr>
<tr class="separator:af1a36385c78ab624cd617065602408b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Functions</h2></td></tr>
<tr class="memitem:a42c2b1c303683515fa4de4c551f54441"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorMapData.html#a42c2b1c303683515fa4de4c551f54441">createAlpha</a> (bool initializeOpaque=true)</td></tr>
<tr class="separator:a42c2b1c303683515fa4de4c551f54441"><td class="memSeparator" colspan="2">&#160;</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#aca5b29e0ca2f299c9060fc6e1f74d0c8">coordToCell</a> and <a class="el" href="classQCPColorMapData.html#af1a36385c78ab624cd617065602408b6">cellToCoord</a>.</p>
<p>A <a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> also holds an on-demand two-dimensional array of alpha values which (if allocated) has the same size as the data map. It can be accessed via <a class="el" href="classQCPColorMapData.html#aaf7de5b34c58f38d8f4c1ceb064a876c">setAlpha</a>, <a class="el" href="classQCPColorMapData.html#a93e2a549d7702bc849cd48a585294657">fillAlpha</a> and <a class="el" href="classQCPColorMapData.html#a14d08b9c3720cd719400079b86d3906b">clearAlpha</a>. The memory for the alpha map is only allocated if needed, i.e. on the first call of <a class="el" href="classQCPColorMapData.html#aaf7de5b34c58f38d8f4c1ceb064a876c">setAlpha</a>. <a class="el" href="classQCPColorMapData.html#a14d08b9c3720cd719400079b86d3906b">clearAlpha</a> restores full opacity and frees the alpha map.</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 &amp; Destructor Documentation</h2>
<a id="aac9d8eb81e18e240d89d56c01933fd23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac9d8eb81e18e240d89d56c01933fd23">&sect;&nbsp;</a></span>QCPColorMapData() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QCPColorMapData::QCPColorMapData </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>keySize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</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> &amp;&#160;</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> &amp;&#160;</td>
          <td class="paramname"><em>valueRange</em>&#160;</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 id="a7f2145d86473263494abb9bf1de20436"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f2145d86473263494abb9bf1de20436">&sect;&nbsp;</a></span>QCPColorMapData() <span class="overload">[2/2]</span></h2>

<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> &amp;&#160;</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 id="afdf4dd1b2f5714234fe84709b85c2a8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdf4dd1b2f5714234fe84709b85c2a8d">&sect;&nbsp;</a></span>operator=()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> &amp; QCPColorMapData::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classQCPColorMapData.html">QCPColorMapData</a> &amp;&#160;</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>. The alpha map state is transferred, too. </p>

</div>
</div>
<a id="a4f7e6b7a97017400cbbd46f0660e68ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f7e6b7a97017400cbbd46f0660e68ea">&sect;&nbsp;</a></span>alpha()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned char QCPColorMapData::alpha </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>keyIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>valueIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the alpha map value of the cell with the indices <em>keyIndex</em> and <em>valueIndex</em>.</p>
<p>If this color map data doesn't have an alpha map (because <a class="el" href="classQCPColorMapData.html#aaf7de5b34c58f38d8f4c1ceb064a876c">setAlpha</a> was never called after creation or after a call to <a class="el" href="classQCPColorMapData.html#a14d08b9c3720cd719400079b86d3906b">clearAlpha</a>), returns 255, which corresponds to full opacity.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPColorMapData.html#aaf7de5b34c58f38d8f4c1ceb064a876c">setAlpha</a> </dd></dl>

</div>
</div>
<a id="a0d9ff35c299d0478b682bfbcdd9c097e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d9ff35c299d0478b682bfbcdd9c097e">&sect;&nbsp;</a></span>setSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorMapData::setSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>keySize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>valueSize</em>&#160;</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#aea88cc75a76ca571acf29b2ba8ac970d">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 id="ac7ef70e383aface34b44dbde49234b6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7ef70e383aface34b44dbde49234b6b">&sect;&nbsp;</a></span>setKeySize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorMapData::setKeySize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</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#aea88cc75a76ca571acf29b2ba8ac970d">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 id="a0893c9e3914513048b45e3429ffd16f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0893c9e3914513048b45e3429ffd16f2">&sect;&nbsp;</a></span>setValueSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorMapData::setValueSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</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#aea88cc75a76ca571acf29b2ba8ac970d">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 id="aad9c1c7c703c1339489fc730517c83d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad9c1c7c703c1339489fc730517c83d4">&sect;&nbsp;</a></span>setRange()</h2>

<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> &amp;&#160;</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> &amp;&#160;</td>
          <td class="paramname"><em>valueRange</em>&#160;</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 id="a0738c485f3c9df9ea1241b7a8bb6a86e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0738c485f3c9df9ea1241b7a8bb6a86e">&sect;&nbsp;</a></span>setKeyRange()</h2>

<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> &amp;&#160;</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 id="ada1b2680ba96a5f4175b6d341cf75d23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada1b2680ba96a5f4175b6d341cf75d23">&sect;&nbsp;</a></span>setValueRange()</h2>

<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> &amp;&#160;</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 id="afd2083ccfd6987ec94aa7ef8e91ca39a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd2083ccfd6987ec94aa7ef8e91ca39a">&sect;&nbsp;</a></span>setData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorMapData::setData </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>z</em>&#160;</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 id="a8e75eaf8746596319032a93f3d2d0683"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e75eaf8746596319032a93f3d2d0683">&sect;&nbsp;</a></span>setCell()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorMapData::setCell </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>keyIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>valueIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>z</em>&#160;</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 id="aaf7de5b34c58f38d8f4c1ceb064a876c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaf7de5b34c58f38d8f4c1ceb064a876c">&sect;&nbsp;</a></span>setAlpha()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorMapData::setAlpha </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>keyIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>valueIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>alpha</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the alpha of the color map cell given by <em>keyIndex</em> and <em>valueIndex</em> to <em>alpha</em>. A value of 0 for <em>alpha</em> results in a fully transparent cell, and a value of 255 results in a fully opaque cell.</p>
<p>If an alpha map doesn't exist yet for this color map data, it will be created here. If you wish to restore full opacity and free any allocated memory of the alpha map, call <a class="el" href="classQCPColorMapData.html#a14d08b9c3720cd719400079b86d3906b">clearAlpha</a>.</p>
<p>Note that the cell-wise alpha which can be configured here is independent of any alpha configured in the color map's gradient (<a class="el" href="classQCPColorGradient.html">QCPColorGradient</a>). If a cell is affected both by the cell-wise and gradient alpha, the alpha values will be blended accordingly during rendering of the color map.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPColorMapData.html#a93e2a549d7702bc849cd48a585294657">fillAlpha</a>, <a class="el" href="classQCPColorMapData.html#a14d08b9c3720cd719400079b86d3906b">clearAlpha</a> </dd></dl>

</div>
</div>
<a id="ab235ade8a4d64bd3adb26a99b3dd57ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab235ade8a4d64bd3adb26a99b3dd57ee">&sect;&nbsp;</a></span>recalculateDataBounds()</h2>

<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 id="a9910ba830e96955bd5c8e5bef1e77ef3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9910ba830e96955bd5c8e5bef1e77ef3">&sect;&nbsp;</a></span>clear()</h2>

<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 id="a14d08b9c3720cd719400079b86d3906b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14d08b9c3720cd719400079b86d3906b">&sect;&nbsp;</a></span>clearAlpha()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorMapData::clearAlpha </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Frees the internal alpha map. The color map will have full opacity again. </p>

</div>
</div>
<a id="a350f783260eb9b5de5c7b5e0d5d3e3c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a350f783260eb9b5de5c7b5e0d5d3e3c2">&sect;&nbsp;</a></span>fill()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorMapData::fill </td>
          <td>(</td>
          <td class="paramtype">double&#160;</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 id="a93e2a549d7702bc849cd48a585294657"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93e2a549d7702bc849cd48a585294657">&sect;&nbsp;</a></span>fillAlpha()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorMapData::fillAlpha </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>alpha</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the opacity of all color map cells to <em>alpha</em>. A value of 0 for <em>alpha</em> results in a fully transparent color map, and a value of 255 results in a fully opaque color map.</p>
<p>If you wish to restore opacity to 100% and free any used memory for the alpha map, rather use <a class="el" href="classQCPColorMapData.html#a14d08b9c3720cd719400079b86d3906b">clearAlpha</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPColorMapData.html#aaf7de5b34c58f38d8f4c1ceb064a876c">setAlpha</a> </dd></dl>

</div>
</div>
<a id="aea88cc75a76ca571acf29b2ba8ac970d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea88cc75a76ca571acf29b2ba8ac970d">&sect;&nbsp;</a></span>isEmpty()</h2>

<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 id="aca5b29e0ca2f299c9060fc6e1f74d0c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca5b29e0ca2f299c9060fc6e1f74d0c8">&sect;&nbsp;</a></span>coordToCell()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorMapData::coordToCell </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>keyIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>valueIndex</em>&#160;</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#aca5b29e0ca2f299c9060fc6e1f74d0c8">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#af1a36385c78ab624cd617065602408b6">cellToCoord</a>, <a class="el" href="classQCPAxis.html#af15d1b3a7f7e9b53d759d3ccff1fe4b4">QCPAxis::coordToPixel</a> </dd></dl>

</div>
</div>
<a id="af1a36385c78ab624cd617065602408b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1a36385c78ab624cd617065602408b6">&sect;&nbsp;</a></span>cellToCoord()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorMapData::cellToCoord </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>keyIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>valueIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>value</em>&#160;</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#af1a36385c78ab624cd617065602408b6">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#aca5b29e0ca2f299c9060fc6e1f74d0c8">coordToCell</a>, <a class="el" href="classQCPAxis.html#a536ef8f624cac59b6b6fdcb495723c57">QCPAxis::pixelToCoord</a> </dd></dl>

</div>
</div>
<a id="a42c2b1c303683515fa4de4c551f54441"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42c2b1c303683515fa4de4c551f54441">&sect;&nbsp;</a></span>createAlpha()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool QCPColorMapData::createAlpha </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>initializeOpaque</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Allocates the internal alpha map with the current data map key/value size and, if <em>initializeOpaque</em> is true, initializes all values to 255. If <em>initializeOpaque</em> is false, the values are not initialized at all. In this case, the alpha map should be initialized manually, e.g. with <a class="el" href="classQCPColorMapData.html#a93e2a549d7702bc849cd48a585294657">fillAlpha</a>.</p>
<p>If an alpha map exists already, it is deleted first. If this color map is empty (has either key or value size zero, see <a class="el" href="classQCPColorMapData.html#aea88cc75a76ca571acf29b2ba8ac970d">isEmpty</a>), the alpha map is cleared.</p>
<p>The return value indicates the existence of the alpha map after the call. So this method returns true if the data map isn't empty and an alpha map was successfully allocated. </p>

</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>