forked from matplotlib/devdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolorbar_api.html
More file actions
689 lines (611 loc) · 35.5 KB
/
colorbar_api.html
File metadata and controls
689 lines (611 loc) · 35.5 KB
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
<!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/html; charset=utf-8" />
<title>colorbar — Matplotlib 2.0.2.post4416.dev0+g1df513f documentation</title>
<link rel="stylesheet" href="../_static/mpl.css"
type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css"
type="text/css" />
<link rel="stylesheet" href="../_static/gallery.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '2.0.2.post4416.dev0+g1df513f',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="Search within Matplotlib 2.0.2.post4416.dev0+g1df513f documentation"
href="../_static/opensearch.xml"/>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html"
/>
<link rel="search" title="Search" href="../search.html"
/>
<link rel="top" title="Matplotlib 2.0.2.post4416.dev0+g1df513f documentation" href="../index.html" />
<link rel="up" title="The Matplotlib API" href="index.html" />
<link rel="next" title="colors" href="colors_api.html" />
<link rel="prev" title="collections" href="collections_api.html" />
</head>
<body>
<!-- The "Fork me on github" ribbon -->
<img style="float: right; margin-bottom: -40px; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" usemap="#ribbonmap"/>
<map name="ribbonmap">
<area shape="poly" coords="15,0,148,-1,148,135" href="https://github.com/matplotlib/matplotlib" title="Fork me on GitHub" />
</map>
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
<a href="../index.html"><img src="../_static/logo2.svg" width="540px" border="0" alt="matplotlib"/></a>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="colors_api.html" title="colors"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="collections_api.html" title="collections"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">home</a>| </li>
<li><a href="../gallery/index.html">examples</a>| </li>
<li><a href="../tutorials/index.html">tutorials</a>| </li>
<li><a href="pyplot_summary.html">pyplot</a>| </li>
<li><a href="../contents.html">docs</a> »</li>
<li><a href="index.html" accesskey="U">The Matplotlib API</a> »</li>
</ul>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper"><a href="https://www.numfocus.org">
<image src="https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A">
</a>
<br/>
<a href="http://depsy.org/package/python/matplotlib">
<img src="../_static/depsy_badge.svg">
</a>
<br/>
Travis-CI: <a href="https://travis-ci.org/matplotlib/matplotlib">
<img src="https://travis-ci.org/matplotlib/matplotlib.svg?branch=master"/>
</a>
<br/>
<h3><a href="../contents.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">colorbar</a><ul>
<li><a class="reference internal" href="#module-matplotlib.colorbar"><code class="docutils literal"><span class="pre">matplotlib.colorbar</span></code></a></li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../contents.html">Documentation overview</a><ul>
<li><a href="index.html">The Matplotlib API</a><ul>
<li>Previous: <a href="collections_api.html" title="previous chapter">collections</a></li>
<li>Next: <a href="colors_api.html" title="next chapter">colors</a></li>
</ul></li>
</ul></li>
</ul>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/colorbar_api.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="colorbar">
<h1>colorbar<a class="headerlink" href="#colorbar" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-matplotlib.colorbar">
<span id="matplotlib-colorbar"></span><h2><a class="reference internal" href="#module-matplotlib.colorbar" title="matplotlib.colorbar"><code class="xref py py-mod docutils literal"><span class="pre">matplotlib.colorbar</span></code></a><a class="headerlink" href="#module-matplotlib.colorbar" title="Permalink to this headline">¶</a></h2>
<p>Colorbar toolkit with two classes and a function:</p>
<blockquote>
<div><dl class="docutils">
<dt><a class="reference internal" href="#matplotlib.colorbar.ColorbarBase" title="matplotlib.colorbar.ColorbarBase"><code class="xref py py-class docutils literal"><span class="pre">ColorbarBase</span></code></a></dt>
<dd>the base class with full colorbar drawing functionality.
It can be used as-is to make a colorbar for a given colormap;
a mappable object (e.g., image) is not needed.</dd>
<dt><a class="reference internal" href="#matplotlib.colorbar.Colorbar" title="matplotlib.colorbar.Colorbar"><code class="xref py py-class docutils literal"><span class="pre">Colorbar</span></code></a></dt>
<dd>the derived class for use with images or contour plots.</dd>
<dt><a class="reference internal" href="#matplotlib.colorbar.make_axes" title="matplotlib.colorbar.make_axes"><code class="xref py py-func docutils literal"><span class="pre">make_axes()</span></code></a></dt>
<dd>a function for resizing an axes and adding a second axes
suitable for a colorbar</dd>
</dl>
</div></blockquote>
<p>The <code class="xref py py-meth docutils literal"><span class="pre">colorbar()</span></code> method uses <a class="reference internal" href="#matplotlib.colorbar.make_axes" title="matplotlib.colorbar.make_axes"><code class="xref py py-func docutils literal"><span class="pre">make_axes()</span></code></a>
and <a class="reference internal" href="#matplotlib.colorbar.Colorbar" title="matplotlib.colorbar.Colorbar"><code class="xref py py-class docutils literal"><span class="pre">Colorbar</span></code></a>; the <a class="reference internal" href="_as_gen/matplotlib.pyplot.colorbar.html#matplotlib.pyplot.colorbar" title="matplotlib.pyplot.colorbar"><code class="xref py py-func docutils literal"><span class="pre">colorbar()</span></code></a> function
is a thin wrapper over <code class="xref py py-meth docutils literal"><span class="pre">colorbar()</span></code>.</p>
<dl class="class">
<dt id="matplotlib.colorbar.Colorbar">
<em class="property">class </em><code class="descclassname">matplotlib.colorbar.</code><code class="descname">Colorbar</code><span class="sig-paren">(</span><em>ax</em>, <em>mappable</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.Colorbar" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matplotlib.colorbar.ColorbarBase" title="matplotlib.colorbar.ColorbarBase"><code class="xref py py-class docutils literal"><span class="pre">matplotlib.colorbar.ColorbarBase</span></code></a></p>
<p>This class connects a <a class="reference internal" href="#matplotlib.colorbar.ColorbarBase" title="matplotlib.colorbar.ColorbarBase"><code class="xref py py-class docutils literal"><span class="pre">ColorbarBase</span></code></a> to a
<a class="reference internal" href="cm_api.html#matplotlib.cm.ScalarMappable" title="matplotlib.cm.ScalarMappable"><code class="xref py py-class docutils literal"><span class="pre">ScalarMappable</span></code></a> such as a
<a class="reference internal" href="image_api.html#matplotlib.image.AxesImage" title="matplotlib.image.AxesImage"><code class="xref py py-class docutils literal"><span class="pre">AxesImage</span></code></a> generated via
<a class="reference internal" href="_as_gen/matplotlib.axes.Axes.imshow.html#matplotlib.axes.Axes.imshow" title="matplotlib.axes.Axes.imshow"><code class="xref py py-meth docutils literal"><span class="pre">imshow()</span></code></a>.</p>
<p>It is not intended to be instantiated directly; instead,
use <code class="xref py py-meth docutils literal"><span class="pre">colorbar()</span></code> or
<a class="reference internal" href="_as_gen/matplotlib.pyplot.colorbar.html#matplotlib.pyplot.colorbar" title="matplotlib.pyplot.colorbar"><code class="xref py py-func docutils literal"><span class="pre">colorbar()</span></code></a> to make your colorbar.</p>
<dl class="method">
<dt id="matplotlib.colorbar.Colorbar.add_lines">
<code class="descname">add_lines</code><span class="sig-paren">(</span><em>CS</em>, <em>erase=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.Colorbar.add_lines" title="Permalink to this definition">¶</a></dt>
<dd><p>Add the lines from a non-filled
<a class="reference internal" href="contour_api.html#matplotlib.contour.ContourSet" title="matplotlib.contour.ContourSet"><code class="xref py py-class docutils literal"><span class="pre">ContourSet</span></code></a> to the colorbar.</p>
<p>Set <em>erase</em> to False if these lines should be added to
any pre-existing lines.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.Colorbar.on_mappable_changed">
<code class="descname">on_mappable_changed</code><span class="sig-paren">(</span><em>mappable</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.Colorbar.on_mappable_changed" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates this colorbar to match the mappable’s properties.</p>
<p>Typically this is automatically registered as an event handler
by <a class="reference internal" href="#matplotlib.colorbar.colorbar_factory" title="matplotlib.colorbar.colorbar_factory"><code class="xref py py-func docutils literal"><span class="pre">colorbar_factory()</span></code></a> and should not be called manually.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.Colorbar.remove">
<code class="descname">remove</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.Colorbar.remove" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove this colorbar from the figure. If the colorbar was created with
<code class="docutils literal"><span class="pre">use_gridspec=True</span></code> then restore the gridspec to its previous value.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.Colorbar.update_bruteforce">
<code class="descname">update_bruteforce</code><span class="sig-paren">(</span><em>mappable</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.Colorbar.update_bruteforce" title="Permalink to this definition">¶</a></dt>
<dd><p>Destroy and rebuild the colorbar. This is
intended to become obsolete, and will probably be
deprecated and then removed. It is not called when
the pyplot.colorbar function or the Figure.colorbar
method are used to create the colorbar.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.Colorbar.update_normal">
<code class="descname">update_normal</code><span class="sig-paren">(</span><em>mappable</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.Colorbar.update_normal" title="Permalink to this definition">¶</a></dt>
<dd><p>update solid, lines, etc. Unlike update_bruteforce, it does
not clear the axes. This is meant to be called when the image
or contour plot to which this colorbar belongs is changed.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="matplotlib.colorbar.ColorbarBase">
<em class="property">class </em><code class="descclassname">matplotlib.colorbar.</code><code class="descname">ColorbarBase</code><span class="sig-paren">(</span><em>ax</em>, <em>cmap=None</em>, <em>norm=None</em>, <em>alpha=None</em>, <em>values=None</em>, <em>boundaries=None</em>, <em>orientation=’vertical’</em>, <em>ticklocation=’auto’</em>, <em>extend=’neither’</em>, <em>spacing=’uniform’</em>, <em>ticks=None</em>, <em>format=None</em>, <em>drawedges=False</em>, <em>filled=True</em>, <em>extendfrac=None</em>, <em>extendrect=False</em>, <em>label=”</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="cm_api.html#matplotlib.cm.ScalarMappable" title="matplotlib.cm.ScalarMappable"><code class="xref py py-class docutils literal"><span class="pre">matplotlib.cm.ScalarMappable</span></code></a></p>
<p>Draw a colorbar in an existing axes.</p>
<p>This is a base class for the <a class="reference internal" href="#matplotlib.colorbar.Colorbar" title="matplotlib.colorbar.Colorbar"><code class="xref py py-class docutils literal"><span class="pre">Colorbar</span></code></a> class, which is the
basis for the <a class="reference internal" href="_as_gen/matplotlib.pyplot.colorbar.html#matplotlib.pyplot.colorbar" title="matplotlib.pyplot.colorbar"><code class="xref py py-func docutils literal"><span class="pre">colorbar()</span></code></a> function and the
<code class="xref py py-meth docutils literal"><span class="pre">colorbar()</span></code> method, which are the
usual ways of creating a colorbar.</p>
<p>It is also useful by itself for showing a colormap. If the <em>cmap</em>
kwarg is given but <em>boundaries</em> and <em>values</em> are left as None,
then the colormap will be displayed on a 0-1 scale. To show the
under- and over-value colors, specify the <em>norm</em> as:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">colors</span><span class="o">.</span><span class="n">Normalize</span><span class="p">(</span><span class="n">clip</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
</pre></div>
</div>
<p>To show the colors versus index instead of on the 0-1 scale,
use:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">norm</span><span class="o">=</span><span class="n">colors</span><span class="o">.</span><span class="n">NoNorm</span><span class="o">.</span>
</pre></div>
</div>
<p>Useful attributes:</p>
<blockquote>
<div><dl class="docutils">
<dt><a class="reference internal" href="#matplotlib.colorbar.ColorbarBase.ax" title="matplotlib.colorbar.ColorbarBase.ax"><code class="xref py py-attr docutils literal"><span class="pre">ax</span></code></a></dt>
<dd>the Axes instance in which the colorbar is drawn</dd>
<dt><code class="xref py py-attr docutils literal"><span class="pre">lines</span></code></dt>
<dd>a list of LineCollection if lines were drawn, otherwise
an empty list</dd>
<dt><code class="xref py py-attr docutils literal"><span class="pre">dividers</span></code></dt>
<dd>a LineCollection if <em>drawedges</em> is True, otherwise None</dd>
</dl>
</div></blockquote>
<p>Useful public methods are <a class="reference internal" href="#matplotlib.colorbar.ColorbarBase.set_label" title="matplotlib.colorbar.ColorbarBase.set_label"><code class="xref py py-meth docutils literal"><span class="pre">set_label()</span></code></a> and <a class="reference internal" href="#matplotlib.colorbar.ColorbarBase.add_lines" title="matplotlib.colorbar.ColorbarBase.add_lines"><code class="xref py py-meth docutils literal"><span class="pre">add_lines()</span></code></a>.</p>
<dl class="method">
<dt id="matplotlib.colorbar.ColorbarBase.add_lines">
<code class="descname">add_lines</code><span class="sig-paren">(</span><em>levels</em>, <em>colors</em>, <em>linewidths</em>, <em>erase=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.add_lines" title="Permalink to this definition">¶</a></dt>
<dd><p>Draw lines on the colorbar.</p>
<p><em>colors</em> and <em>linewidths</em> must be scalars or
sequences the same length as <em>levels</em>.</p>
<p>Set <em>erase</em> to False to add lines without first
removing any previously added lines.</p>
</dd></dl>
<dl class="attribute">
<dt id="matplotlib.colorbar.ColorbarBase.ax">
<code class="descname">ax</code><em class="property"> = None</em><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.ax" title="Permalink to this definition">¶</a></dt>
<dd><p>The axes that this colorbar lives in.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.ColorbarBase.config_axis">
<code class="descname">config_axis</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.config_axis" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.ColorbarBase.draw_all">
<code class="descname">draw_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.draw_all" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate any free parameters based on the current cmap and norm,
and do all the drawing.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.ColorbarBase.get_ticks">
<code class="descname">get_ticks</code><span class="sig-paren">(</span><em>minor=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.get_ticks" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the x ticks as a list of locations</p>
</dd></dl>
<dl class="attribute">
<dt id="matplotlib.colorbar.ColorbarBase.n_rasterize">
<code class="descname">n_rasterize</code><em class="property"> = 50</em><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.n_rasterize" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.ColorbarBase.remove">
<code class="descname">remove</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.remove" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove this colorbar from the figure</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.ColorbarBase.set_alpha">
<code class="descname">set_alpha</code><span class="sig-paren">(</span><em>alpha</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.set_alpha" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.ColorbarBase.set_label">
<code class="descname">set_label</code><span class="sig-paren">(</span><em>label</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.set_label" title="Permalink to this definition">¶</a></dt>
<dd><p>Label the long axis of the colorbar</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.ColorbarBase.set_ticklabels">
<code class="descname">set_ticklabels</code><span class="sig-paren">(</span><em>ticklabels</em>, <em>update_ticks=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.set_ticklabels" title="Permalink to this definition">¶</a></dt>
<dd><p>set tick labels. Tick labels are updated immediately unless
update_ticks is <em>False</em>. To manually update the ticks, call
<em>update_ticks</em> method explicitly.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.ColorbarBase.set_ticks">
<code class="descname">set_ticks</code><span class="sig-paren">(</span><em>ticks</em>, <em>update_ticks=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.set_ticks" title="Permalink to this definition">¶</a></dt>
<dd><p>Set tick locations.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>ticks</strong> : {None, sequence, <a class="reference internal" href="ticker_api.html#matplotlib.ticker.Locator" title="matplotlib.ticker.Locator"><code class="xref py py-class docutils literal"><span class="pre">Locator</span></code></a> instance}</p>
<blockquote>
<div><p>If None, a default Locator will be used.</p>
</div></blockquote>
<p><strong>update_ticks</strong> : {True, False}, optional</p>
<blockquote class="last">
<div><p>If True, tick locations are updated immediately. If False,
use <a class="reference internal" href="#matplotlib.colorbar.ColorbarBase.update_ticks" title="matplotlib.colorbar.ColorbarBase.update_ticks"><code class="xref py py-meth docutils literal"><span class="pre">update_ticks()</span></code></a> to manually update the ticks.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colorbar.ColorbarBase.update_ticks">
<code class="descname">update_ticks</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarBase.update_ticks" title="Permalink to this definition">¶</a></dt>
<dd><p>Force the update of the ticks and ticklabels. This must be
called whenever the tick locator and/or tick formatter changes.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="matplotlib.colorbar.ColorbarPatch">
<em class="property">class </em><code class="descclassname">matplotlib.colorbar.</code><code class="descname">ColorbarPatch</code><span class="sig-paren">(</span><em>ax</em>, <em>mappable</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.ColorbarPatch" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matplotlib.colorbar.Colorbar" title="matplotlib.colorbar.Colorbar"><code class="xref py py-class docutils literal"><span class="pre">matplotlib.colorbar.Colorbar</span></code></a></p>
<p>A Colorbar which is created using <a class="reference internal" href="_as_gen/matplotlib.patches.Patch.html#matplotlib.patches.Patch" title="matplotlib.patches.Patch"><code class="xref py py-class docutils literal"><span class="pre">Patch</span></code></a>
rather than the default <code class="xref py py-func docutils literal"><span class="pre">pcolor()</span></code>.</p>
<p>It uses a list of Patch instances instead of a
<a class="reference internal" href="collections_api.html#matplotlib.collections.PatchCollection" title="matplotlib.collections.PatchCollection"><code class="xref py py-class docutils literal"><span class="pre">PatchCollection</span></code></a> because the
latter does not allow the hatch pattern to vary among the
members of the collection.</p>
</dd></dl>
<dl class="function">
<dt id="matplotlib.colorbar.colorbar_factory">
<code class="descclassname">matplotlib.colorbar.</code><code class="descname">colorbar_factory</code><span class="sig-paren">(</span><em>cax</em>, <em>mappable</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.colorbar_factory" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a colorbar on the given axes for the given mappable.</p>
<p>Typically, for automatic colorbar placement given only a mappable use
<code class="xref py py-meth docutils literal"><span class="pre">colorbar()</span></code>.</p>
</dd></dl>
<dl class="function">
<dt id="matplotlib.colorbar.make_axes">
<code class="descclassname">matplotlib.colorbar.</code><code class="descname">make_axes</code><span class="sig-paren">(</span><em>parents</em>, <em>location=None</em>, <em>orientation=None</em>, <em>fraction=0.15</em>, <em>shrink=1.0</em>, <em>aspect=20</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.make_axes" title="Permalink to this definition">¶</a></dt>
<dd><p>Resize and reposition parent axes, and return a child
axes suitable for a colorbar.</p>
<p>Keyword arguments may include the following (with defaults):</p>
<blockquote>
<div><dl class="docutils">
<dt>location <span class="classifier-delimiter">:</span> <span class="classifier">[None|’left’|’right’|’top’|’bottom’]</span></dt>
<dd>The position, relative to <strong>parents</strong>, where the colorbar axes
should be created. If None, the value will either come from the
given <code class="docutils literal"><span class="pre">orientation</span></code>, else it will default to ‘right’.</dd>
<dt>orientation <span class="classifier-delimiter">:</span> <span class="classifier">[None|’vertical’|’horizontal’]</span></dt>
<dd>The orientation of the colorbar. Typically, this keyword shouldn’t
be used, as it can be derived from the <code class="docutils literal"><span class="pre">location</span></code> keyword.</dd>
</dl>
</div></blockquote>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><em>orientation</em></td>
<td>vertical or horizontal</td>
</tr>
<tr class="row-odd"><td><em>fraction</em></td>
<td>0.15; fraction of original axes to use for colorbar</td>
</tr>
<tr class="row-even"><td><em>pad</em></td>
<td>0.05 if vertical, 0.15 if horizontal; fraction
of original axes between colorbar and new image axes</td>
</tr>
<tr class="row-odd"><td><em>shrink</em></td>
<td>1.0; fraction by which to shrink the colorbar</td>
</tr>
<tr class="row-even"><td><em>aspect</em></td>
<td>20; ratio of long to short dimensions</td>
</tr>
<tr class="row-odd"><td><em>anchor</em></td>
<td>(0.0, 0.5) if vertical; (0.5, 1.0) if horizontal;
the anchor point of the colorbar axes</td>
</tr>
<tr class="row-even"><td><em>panchor</em></td>
<td>(1.0, 0.5) if vertical; (0.5, 0.0) if horizontal;
the anchor point of the colorbar parent axes. If
False, the parent axes’ anchor will be unchanged</td>
</tr>
</tbody>
</table>
<p>Returns (cax, kw), the child axes and the reduced kw dictionary to be
passed when creating the colorbar instance.</p>
</dd></dl>
<dl class="function">
<dt id="matplotlib.colorbar.make_axes_gridspec">
<code class="descclassname">matplotlib.colorbar.</code><code class="descname">make_axes_gridspec</code><span class="sig-paren">(</span><em>parent</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.colorbar.make_axes_gridspec" title="Permalink to this definition">¶</a></dt>
<dd><p>Resize and reposition a parent axes, and return a child axes
suitable for a colorbar. This function is similar to
make_axes. Prmary differences are</p>
<blockquote>
<div><ul>
<li><p class="first"><em>make_axes_gridspec</em> only handles the <em>orientation</em> keyword
and cannot handle the “location” keyword.</p>
</li>
<li><p class="first"><em>make_axes_gridspec</em> should only be used with a subplot parent.</p>
</li>
<li><dl class="first docutils">
<dt><em>make_axes</em> creates an instance of Axes. <em>make_axes_gridspec</em></dt>
<dd><p class="first last">creates an instance of Subplot.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><em>make_axes</em> updates the position of the</dt>
<dd><p class="first last">parent. <em>make_axes_gridspec</em> replaces the grid_spec attribute
of the parent with a new one.</p>
</dd>
</dl>
</li>
</ul>
</div></blockquote>
<p>While this function is meant to be compatible with <em>make_axes</em>,
there could be some minor differences.</p>
<p>Keyword arguments may include the following (with defaults):</p>
<blockquote>
<div><dl class="docutils">
<dt><em>orientation</em></dt>
<dd>‘vertical’ or ‘horizontal’</dd>
</dl>
</div></blockquote>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><em>orientation</em></td>
<td>vertical or horizontal</td>
</tr>
<tr class="row-odd"><td><em>fraction</em></td>
<td>0.15; fraction of original axes to use for colorbar</td>
</tr>
<tr class="row-even"><td><em>pad</em></td>
<td>0.05 if vertical, 0.15 if horizontal; fraction
of original axes between colorbar and new image axes</td>
</tr>
<tr class="row-odd"><td><em>shrink</em></td>
<td>1.0; fraction by which to shrink the colorbar</td>
</tr>
<tr class="row-even"><td><em>aspect</em></td>
<td>20; ratio of long to short dimensions</td>
</tr>
<tr class="row-odd"><td><em>anchor</em></td>
<td>(0.0, 0.5) if vertical; (0.5, 1.0) if horizontal;
the anchor point of the colorbar axes</td>
</tr>
<tr class="row-even"><td><em>panchor</em></td>
<td>(1.0, 0.5) if vertical; (0.5, 0.0) if horizontal;
the anchor point of the colorbar parent axes. If
False, the parent axes’ anchor will be unchanged</td>
</tr>
</tbody>
</table>
<p>All but the first of these are stripped from the input kw set.</p>
<p>Returns (cax, kw), the child axes and the reduced kw dictionary to be
passed when creating the colorbar instance.</p>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2017 The Matplotlib development team.
Last updated on Jul 16, 2017.
Created using <a
href="http://sphinx-doc.org/">Sphinx</a> 1.6.2.
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-55954603-1', 'auto');
ga('send', 'pageview');
</script>
</body>
<footer>
<!--Flipcause Integration v3.0// Flipcause Integration Instructions:
Install the following code block once in the website Header (after <head> tag) -->
<style>
.fc-black_overlay{
display:none; position: fixed; z-index:1000001; top: 0%;left: 0%;width: 100%;height: 100%;
background-color: black; filter: alpha(opacity=50); cursor:pointer; opacity:0.5;
}
.fc-white_content {
opacity:1; display:none; margin-top: -320px; margin-left: -485px; width:970px; height:640px;
position:fixed; top:50%; left:50%; border: none;z-index:1000002;overflow: auto;
}
.fc-main-box{
opacity:1; display:none; margin:15px auto 0 auto; width:930px; position:relative; z-index:1000003;
}
.fc-widget_close{
opacity:1; content:url(http://i1338.photobucket.com/albums/o691/WeCause/X_zpse4a7e538.png);
position:absolute; z-index=1000004; right:-16px; top:-16px; display:block; cursor:pointer;
}
.floating_button{
display: block; margin-top: 0px; margin-left: 0px; width:auto ; height: auto;
position:fixed; z-index:999999; overflow: auto;
}
@keyframes backfadesin {
from { opacity:0; }
to {opacity:.5;}
}
@-moz-keyframes backfadesin {
from { opacity:0; }
to {opacity:.5;}
}
@-webkit-keyframes backfadesin {
from { opacity:0; }
to {opacity:.5;}
}
@-o-keyframes backfadesin {
from { opacity:0; }
to {opacity:.5;}
}
@-ms-keyframes backfadesin {
from { opacity:0; }
to {opacity:.5;}
}
@keyframes fadesin {
0%{ opacity:0; }
50%{ opacity:0; }
75% {opacity: 0; transform: translateY(20px);}
100% {opacity: 1; transform: translateY(0);}
}
@-moz-keyframes fadesin {
0%{ opacity:0; }
50%{ opacity:0; }
75% {opacity: 0; -moz-transform: translateY(20px);}
100% {opacity: 1; -moz-transform: translateY(0);}
}
@-webkit-keyframes fadesin {
0%{ opacity:0; }
50%{ opacity:0; }
75% {opacity: 0; -webkit-transform: translateY(20px);}
100% {opacity: 1; -webkit-transform: translateY(0);}
}
@-o-keyframes fadesin {
0%{ opacity:0; }
50%{ opacity:0; }
75% {opacity: 0; -o-transform: translateY(20px);}
100% {opacity: 1; -o-transform: translateY(0);}
}
@-ms-keyframes fadesin {
0%{ opacity:0; }
50%{ opacity:0; }
75% {opacity: 0; -ms-transform: translateY(20px);}
100% {opacity: 1; -ms-transform: translateY(0);}
}
</style>
<script>
function open_window(cause_id) {
var protocol=String(document.location.protocol);
var new_url;
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
new_url="https://www.flipcause.com/widget/"+cause_id
window.open(new_url);
}
else {
document.getElementById("fc-fade").style.display = "block";
document.getElementById("fc-fade").style.webkitAnimation = "backfadesin 1s";
document.getElementById("fc-fade").style.animation = "backfadesin 1s";
document.getElementById("fc-fade").style.mozAnimation = "backfadesin 1s";
document.getElementById("fc-light").style.display = "block";
document.getElementById("fc-light").style.webkitAnimation = "fadesin 1.5s";
document.getElementById("fc-light").style.animation = "fadesin 1.5s";
document.getElementById("fc-light").style.mozAnimation = "fadesin 1.5s";
document.getElementById("fc-main").style.display = "block";
document.getElementById("fc-main").style.webkitAnimation = "fadesin 1.5s";
document.getElementById("fc-main").style.animation = "fadesin 1.5s";
document.getElementById("fc-main").style.mozAnimation = "fadesin 1.5s";
document.getElementById("fc-close").style.display = "block";
document.getElementById("fc-close").style.webkitAnimation = "fadesin 1.5s";
document.getElementById("fc-close").style.animation = "fadesin 1.5s";
document.getElementById("fc-close").style.mozAnimation = "fadesin 1.5s";
document.getElementById("fc-myFrame").style.display = "block";
document.getElementById("fc-myFrame").style.webkitAnimation = "fadesin 1.5s";
document.getElementById("fc-myFrame").style.animation = "fadesin 1.5s";
document.getElementById("fc-myFrame").style.mozAnimation = "fadesin 1.5s";
document.getElementById("fc-myFrame").src="https://www.flipcause.com/widget/"+cause_id;
}
}
function close_window() {
document.getElementById("fc-fade").style.display="none";
document.getElementById("fc-light").style.display="none";
document.getElementById("fc-main").style.display="none";
document.getElementById("fc-close").style.display="none";
document.getElementById("fc-myFrame").style.display="none";
}
</script>
<div id="fc-fade" class="fc-black_overlay" onclick="close_window()"></div>
<div id="fc-light" class="fc-white_content">
<div id="fc-main" class="fc-main-box">
<div id="fc-close" class="fc-widget_close" onclick="close_window()">
</div><iframe id="fc-myFrame" iframe height="580" width="925" style="border: 0;
border-radius:5px 5px 5px 5px; box-shadow:0 0 8px rgba(0, 0, 0, 0.5);" scrolling="no" src=""></iframe></div>
</div>
<!--END Flipcause Main Integration Code-->
</footer>
</html>