forked from matplotlib/matplotlib.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolors_api.html
More file actions
738 lines (675 loc) · 45.4 KB
/
colors_api.html
File metadata and controls
738 lines (675 loc) · 45.4 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
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
731
732
733
734
735
736
737
738
<!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>colors — Matplotlib 1.3.x documentation</title>
<link rel="stylesheet" href="../_static/mpl.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '1.3.x',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</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 1.3.x documentation"
href="../_static/opensearch.xml"/>
<link rel="top" title="Matplotlib 1.3.x documentation" href="../index.html" />
<link rel="up" title="The Matplotlib API" href="index.html" />
<link rel="next" title="dates" href="dates_api.html" />
<link rel="prev" title="colorbar" href="colorbar_api.html" />
</head>
<body>
<!-- Piwik -->
<script type="text/javascript">
if ("matplotlib.sourceforge.net" == document.location.hostname ||
"matplotlib.sf.net" == document.location.hostname) {
var pkBaseURL = (("https:" == document.location.protocol) ? "https://apps.sourceforge.net/piwik/matplotlib/" : "http://apps.sourceforge.net/piwik/matplotlib/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script type="text/javascript">
if ("matplotlib.sourceforge.net" == document.location.hostname ||
"matplotlib.sf.net" == document.location.hostname) {
piwik_action_name = '';
piwik_idsite = 1;
piwik_url = pkBaseURL + "piwik.php";
piwik_log(piwik_action_name, piwik_idsite, piwik_url);
document.write(unescape('%3Cobject%3E%3Cnoscript%3E%3Cp%3E%3Cimg src="http://apps.sourceforge.net/piwik/matplotlib/piwik.php?idsite=1" alt="piwik"/%3E%3C/p%3E%3C/noscript%3E%3C/object%3E'));
}
</script>
<!-- End Piwik Tag -->
<link rel="shortcut icon" href="_static/favicon.ico">
<!-- 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.png" 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="dates_api.html" title="dates"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="colorbar_api.html" title="colorbar"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">home</a>| </li>
<li><a href="../examples/index.html">examples</a>| </li>
<li><a href="../gallery.html">gallery</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">
<h3><a href="../contents.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">colors</a><ul>
<li><a class="reference internal" href="#module-matplotlib.colors"><tt class="docutils literal"><span class="pre">matplotlib.colors</span></tt></a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="colorbar_api.html"
title="previous chapter">colorbar</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="dates_api.html"
title="next chapter">dates</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/colors_api.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</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="colors">
<h1>colors<a class="headerlink" href="#colors" title="Permalink to this headline">¶</a></h1>
<p>For a visual representation of the matplotlib colormaps, see the
“Color” section in the gallery.</p>
<div class="section" id="module-matplotlib.colors">
<span id="matplotlib-colors"></span><h2><a class="reference internal" href="#module-matplotlib.colors" title="matplotlib.colors"><tt class="xref py py-mod docutils literal"><span class="pre">matplotlib.colors</span></tt></a><a class="headerlink" href="#module-matplotlib.colors" title="Permalink to this headline">¶</a></h2>
<p>A module for converting numbers or color arguments to <em>RGB</em> or <em>RGBA</em></p>
<p><em>RGB</em> and <em>RGBA</em> are sequences of, respectively, 3 or 4 floats in the
range 0-1.</p>
<p>This module includes functions and classes for color specification
conversions, and for mapping numbers to colors in a 1-D array of colors called
a colormap. Colormapping typically involves two steps: a data array is first
mapped onto the range 0-1 using an instance of <a class="reference internal" href="#matplotlib.colors.Normalize" title="matplotlib.colors.Normalize"><tt class="xref py py-class docutils literal"><span class="pre">Normalize</span></tt></a> or of a
subclass; then this number in the 0-1 range is mapped to a color using an
instance of a subclass of <a class="reference internal" href="#matplotlib.colors.Colormap" title="matplotlib.colors.Colormap"><tt class="xref py py-class docutils literal"><span class="pre">Colormap</span></tt></a>. Two are provided here:
<a class="reference internal" href="#matplotlib.colors.LinearSegmentedColormap" title="matplotlib.colors.LinearSegmentedColormap"><tt class="xref py py-class docutils literal"><span class="pre">LinearSegmentedColormap</span></tt></a>, which is used to generate all the built-in
colormap instances, but is also useful for making custom colormaps, and
<a class="reference internal" href="#matplotlib.colors.ListedColormap" title="matplotlib.colors.ListedColormap"><tt class="xref py py-class docutils literal"><span class="pre">ListedColormap</span></tt></a>, which is used for generating a custom colormap from a
list of color specifications.</p>
<p>The module also provides a single instance, <em>colorConverter</em>, of the
<a class="reference internal" href="#matplotlib.colors.ColorConverter" title="matplotlib.colors.ColorConverter"><tt class="xref py py-class docutils literal"><span class="pre">ColorConverter</span></tt></a> class providing methods for converting single color
specifications or sequences of them to <em>RGB</em> or <em>RGBA</em>.</p>
<p>Commands which take color arguments can use several formats to specify
the colors. For the basic built-in colors, you can use a single letter</p>
<blockquote>
<div><ul class="simple">
<li>b: blue</li>
<li>g: green</li>
<li>r: red</li>
<li>c: cyan</li>
<li>m: magenta</li>
<li>y: yellow</li>
<li>k: black</li>
<li>w: white</li>
</ul>
</div></blockquote>
<p>Gray shades can be given as a string encoding a float in the 0-1 range, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">color</span> <span class="o">=</span> <span class="s">'0.75'</span>
</pre></div>
</div>
<p>For a greater range of colors, you have two options. You can specify the
color using an html hex string, as in:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">color</span> <span class="o">=</span> <span class="s">'#eeefff'</span>
</pre></div>
</div>
<p>or you can pass an <em>R</em> , <em>G</em> , <em>B</em> tuple, where each of <em>R</em> , <em>G</em> , <em>B</em> are in
the range [0,1].</p>
<p>Finally, legal html names for colors, like ‘red’, ‘burlywood’ and ‘chartreuse’
are supported.</p>
<dl class="class">
<dt id="matplotlib.colors.BoundaryNorm">
<em class="property">class </em><tt class="descclassname">matplotlib.colors.</tt><tt class="descname">BoundaryNorm</tt><big>(</big><em>boundaries</em>, <em>ncolors</em>, <em>clip=False</em><big>)</big><a class="headerlink" href="#matplotlib.colors.BoundaryNorm" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matplotlib.colors.Normalize" title="matplotlib.colors.Normalize"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.Normalize</span></tt></a></p>
<p>Generate a colormap index based on discrete intervals.</p>
<p>Unlike <a class="reference internal" href="#matplotlib.colors.Normalize" title="matplotlib.colors.Normalize"><tt class="xref py py-class docutils literal"><span class="pre">Normalize</span></tt></a> or <a class="reference internal" href="#matplotlib.colors.LogNorm" title="matplotlib.colors.LogNorm"><tt class="xref py py-class docutils literal"><span class="pre">LogNorm</span></tt></a>,
<a class="reference internal" href="#matplotlib.colors.BoundaryNorm" title="matplotlib.colors.BoundaryNorm"><tt class="xref py py-class docutils literal"><span class="pre">BoundaryNorm</span></tt></a> maps values to integers instead of to the
interval 0-1.</p>
<p>Mapping to the 0-1 interval could have been done via
piece-wise linear interpolation, but using integers seems
simpler, and reduces the number of conversions back and forth
between integer and floating point.</p>
<dl class="docutils">
<dt><em>boundaries</em></dt>
<dd>a monotonically increasing sequence</dd>
<dt><em>ncolors</em></dt>
<dd>number of colors in the colormap to be used</dd>
</dl>
<p>If:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">b</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o"><=</span> <span class="n">v</span> <span class="o"><</span> <span class="n">b</span><span class="p">[</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span>
</pre></div>
</div>
<p>then v is mapped to color j;
as i varies from 0 to len(boundaries)-2,
j goes from 0 to ncolors-1.</p>
<p>Out-of-range values are mapped to -1 if low and ncolors
if high; these are converted to valid indices by
<tt class="xref py py-meth docutils literal"><span class="pre">Colormap.__call__()</span></tt> .</p>
<dl class="method">
<dt id="matplotlib.colors.BoundaryNorm.inverse">
<tt class="descname">inverse</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#matplotlib.colors.BoundaryNorm.inverse" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="matplotlib.colors.ColorConverter">
<em class="property">class </em><tt class="descclassname">matplotlib.colors.</tt><tt class="descname">ColorConverter</tt><a class="headerlink" href="#matplotlib.colors.ColorConverter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Provides methods for converting color specifications to <em>RGB</em> or <em>RGBA</em></p>
<p>Caching is used for more efficient conversion upon repeated calls
with the same argument.</p>
<p>Ordinarily only the single instance instantiated in this module,
<em>colorConverter</em>, is needed.</p>
<dl class="attribute">
<dt id="matplotlib.colors.ColorConverter.cache">
<tt class="descname">cache</tt><em class="property"> = {'0.8': (0.8, 0.8, 0.8), '0.5': (0.5, 0.5, 0.5), 'yellow': (1.0, 1.0, 0.0), '0.6': (0.6, 0.6, 0.6), 'magenta': (1.0, 0.0, 1.0), 'blue': (0.0, 0.0, 1.0), 'purple': (0.5019607843137255, 0.0, 0.5019607843137255), 'black': (0.0, 0.0, 0.0), 'red': (1.0, 0.0, 0.0), '#afeeee': (0.6862745098039216, 0.9333333333333333, 0.9333333333333333), '0.75': (0.75, 0.75, 0.75), 'cyan': (0.0, 1.0, 1.0), 'c': (0.0, 0.75, 0.75), 'b': (0.0, 0.0, 1.0), 'g': (0.0, 0.5, 0.0), 'k': (0.0, 0.0, 0.0), 'm': (0.75, 0, 0.75), 'r': (1.0, 0.0, 0.0), 'green': (0.0, 0.5019607843137255, 0.0), 'w': (1.0, 1.0, 1.0), 'y': (0.75, 0.75, 0), '0.90': (0.9, 0.9, 0.9)}</em><a class="headerlink" href="#matplotlib.colors.ColorConverter.cache" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="matplotlib.colors.ColorConverter.colors">
<tt class="descname">colors</tt><em class="property"> = {'c': (0.0, 0.75, 0.75), 'b': (0.0, 0.0, 1.0), 'w': (1.0, 1.0, 1.0), 'g': (0.0, 0.5, 0.0), 'y': (0.75, 0.75, 0), 'k': (0.0, 0.0, 0.0), 'r': (1.0, 0.0, 0.0), 'm': (0.75, 0, 0.75)}</em><a class="headerlink" href="#matplotlib.colors.ColorConverter.colors" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="matplotlib.colors.ColorConverter.to_rgb">
<tt class="descname">to_rgb</tt><big>(</big><em>arg</em><big>)</big><a class="headerlink" href="#matplotlib.colors.ColorConverter.to_rgb" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns an <em>RGB</em> tuple of three floats from 0-1.</p>
<p><em>arg</em> can be an <em>RGB</em> or <em>RGBA</em> sequence or a string in any of
several forms:</p>
<blockquote>
<div><ol class="arabic simple">
<li>a letter from the set ‘rgbcmykw’</li>
<li>a hex color string, like ‘#00FFFF’</li>
<li>a standard name, like ‘aqua’</li>
<li>a float, like ‘0.4’, indicating gray on a 0-1 scale</li>
</ol>
</div></blockquote>
<p>if <em>arg</em> is <em>RGBA</em>, the <em>A</em> will simply be discarded.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.ColorConverter.to_rgba">
<tt class="descname">to_rgba</tt><big>(</big><em>arg</em>, <em>alpha=None</em><big>)</big><a class="headerlink" href="#matplotlib.colors.ColorConverter.to_rgba" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns an <em>RGBA</em> tuple of four floats from 0-1.</p>
<p>For acceptable values of <em>arg</em>, see <a class="reference internal" href="#matplotlib.colors.ColorConverter.to_rgb" title="matplotlib.colors.ColorConverter.to_rgb"><tt class="xref py py-meth docutils literal"><span class="pre">to_rgb()</span></tt></a>.
In addition, if <em>arg</em> is “none” (case-insensitive),
then (0,0,0,0) will be returned.
If <em>arg</em> is an <em>RGBA</em> sequence and <em>alpha</em> is not <em>None</em>,
<em>alpha</em> will replace the original <em>A</em>.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.ColorConverter.to_rgba_array">
<tt class="descname">to_rgba_array</tt><big>(</big><em>c</em>, <em>alpha=None</em><big>)</big><a class="headerlink" href="#matplotlib.colors.ColorConverter.to_rgba_array" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a numpy array of <em>RGBA</em> tuples.</p>
<p>Accepts a single mpl color spec or a sequence of specs.</p>
<p>Special case to handle “no color”: if <em>c</em> is “none” (case-insensitive),
then an empty array will be returned. Same for an empty list.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="matplotlib.colors.Colormap">
<em class="property">class </em><tt class="descclassname">matplotlib.colors.</tt><tt class="descname">Colormap</tt><big>(</big><em>name</em>, <em>N=256</em><big>)</big><a class="headerlink" href="#matplotlib.colors.Colormap" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Baseclass for all scalar to RGBA mappings.</p>
<p>Typically Colormap instances are used to convert data values (floats) from
the interval <tt class="docutils literal"><span class="pre">[0,</span> <span class="pre">1]</span></tt> to the RGBA color that the respective Colormap
represents. For scaling of data into the <tt class="docutils literal"><span class="pre">[0,</span> <span class="pre">1]</span></tt> interval see
<a class="reference internal" href="#matplotlib.colors.Normalize" title="matplotlib.colors.Normalize"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.Normalize</span></tt></a>. It is worth noting that
<a class="reference internal" href="cm_api.html#matplotlib.cm.ScalarMappable" title="matplotlib.cm.ScalarMappable"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.cm.ScalarMappable</span></tt></a> subclasses make heavy use of this
<tt class="docutils literal"><span class="pre">data->normalize->map-to-color</span></tt> processing chain.</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>name</strong> : str</p>
<blockquote>
<div><p>The name of the colormap.</p>
</div></blockquote>
<p><strong>N</strong> : int</p>
<blockquote class="last">
<div><p>The number of rgb quantization levels.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="matplotlib.colors.Colormap.is_gray">
<tt class="descname">is_gray</tt><big>(</big><big>)</big><a class="headerlink" href="#matplotlib.colors.Colormap.is_gray" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="matplotlib.colors.Colormap.set_bad">
<tt class="descname">set_bad</tt><big>(</big><em>color='k'</em>, <em>alpha=None</em><big>)</big><a class="headerlink" href="#matplotlib.colors.Colormap.set_bad" title="Permalink to this definition">¶</a></dt>
<dd><p>Set color to be used for masked values.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.Colormap.set_over">
<tt class="descname">set_over</tt><big>(</big><em>color='k'</em>, <em>alpha=None</em><big>)</big><a class="headerlink" href="#matplotlib.colors.Colormap.set_over" title="Permalink to this definition">¶</a></dt>
<dd><p>Set color to be used for high out-of-range values.
Requires norm.clip = False</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.Colormap.set_under">
<tt class="descname">set_under</tt><big>(</big><em>color='k'</em>, <em>alpha=None</em><big>)</big><a class="headerlink" href="#matplotlib.colors.Colormap.set_under" title="Permalink to this definition">¶</a></dt>
<dd><p>Set color to be used for low out-of-range values.
Requires norm.clip = False</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="matplotlib.colors.LightSource">
<em class="property">class </em><tt class="descclassname">matplotlib.colors.</tt><tt class="descname">LightSource</tt><big>(</big><em>azdeg=315</em>, <em>altdeg=45</em>, <em>hsv_min_val=0</em>, <em>hsv_max_val=1</em>, <em>hsv_min_sat=1</em>, <em>hsv_max_sat=0</em><big>)</big><a class="headerlink" href="#matplotlib.colors.LightSource" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Create a light source coming from the specified azimuth and elevation.
Angles are in degrees, with the azimuth measured
clockwise from north and elevation up from the zero plane of the surface.
The <a class="reference internal" href="#matplotlib.colors.LightSource.shade" title="matplotlib.colors.LightSource.shade"><tt class="xref py py-meth docutils literal"><span class="pre">shade()</span></tt></a> is used to produce rgb values for a shaded relief image
given a data array.</p>
<p>Specify the azimuth (measured clockwise from south) and altitude
(measured up from the plane of the surface) of the light source
in degrees.</p>
<p>The color of the resulting image will be darkened
by moving the (s,v) values (in hsv colorspace) toward
(hsv_min_sat, hsv_min_val) in the shaded regions, or
lightened by sliding (s,v) toward
(hsv_max_sat hsv_max_val) in regions that are illuminated.
The default extremes are chose so that completely shaded points
are nearly black (s = 1, v = 0) and completely illuminated points
are nearly white (s = 0, v = 1).</p>
<dl class="method">
<dt id="matplotlib.colors.LightSource.shade">
<tt class="descname">shade</tt><big>(</big><em>data</em>, <em>cmap</em><big>)</big><a class="headerlink" href="#matplotlib.colors.LightSource.shade" title="Permalink to this definition">¶</a></dt>
<dd><p>Take the input data array, convert to HSV values in the
given colormap, then adjust those color values
to given the impression of a shaded relief map with a
specified light source.
RGBA values are returned, which can then be used to
plot the shaded image with imshow.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.LightSource.shade_rgb">
<tt class="descname">shade_rgb</tt><big>(</big><em>rgb</em>, <em>elevation</em>, <em>fraction=1.0</em><big>)</big><a class="headerlink" href="#matplotlib.colors.LightSource.shade_rgb" title="Permalink to this definition">¶</a></dt>
<dd><p>Take the input RGB array (ny*nx*3) adjust their color values
to given the impression of a shaded relief map with a
specified light source using the elevation (ny*nx).
A new RGB array ((ny*nx*3)) is returned.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="matplotlib.colors.LinearSegmentedColormap">
<em class="property">class </em><tt class="descclassname">matplotlib.colors.</tt><tt class="descname">LinearSegmentedColormap</tt><big>(</big><em>name</em>, <em>segmentdata</em>, <em>N=256</em>, <em>gamma=1.0</em><big>)</big><a class="headerlink" href="#matplotlib.colors.LinearSegmentedColormap" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matplotlib.colors.Colormap" title="matplotlib.colors.Colormap"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.Colormap</span></tt></a></p>
<p>Colormap objects based on lookup tables using linear segments.</p>
<p>The lookup table is generated using linear interpolation for each
primary color, with the 0-1 domain divided into any number of
segments.</p>
<p>Create color map from linear mapping segments</p>
<p>segmentdata argument is a dictionary with a red, green and blue
entries. Each entry should be a list of <em>x</em>, <em>y0</em>, <em>y1</em> tuples,
forming rows in a table. Entries for alpha are optional.</p>
<p>Example: suppose you want red to increase from 0 to 1 over
the bottom half, green to do the same over the middle half,
and blue over the top half. Then you would use:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">cdict</span> <span class="o">=</span> <span class="p">{</span><span class="s">'red'</span><span class="p">:</span> <span class="p">[(</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">),</span>
<span class="p">(</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">),</span>
<span class="p">(</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">)],</span>
<span class="s">'green'</span><span class="p">:</span> <span class="p">[(</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">),</span>
<span class="p">(</span><span class="mf">0.25</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">),</span>
<span class="p">(</span><span class="mf">0.75</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">),</span>
<span class="p">(</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">)],</span>
<span class="s">'blue'</span><span class="p">:</span> <span class="p">[(</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">),</span>
<span class="p">(</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">),</span>
<span class="p">(</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">)]}</span>
</pre></div>
</div>
<p>Each row in the table for a given color is a sequence of
<em>x</em>, <em>y0</em>, <em>y1</em> tuples. In each sequence, <em>x</em> must increase
monotonically from 0 to 1. For any input value <em>z</em> falling
between <em>x[i]</em> and <em>x[i+1]</em>, the output value of a given color
will be linearly interpolated between <em>y1[i]</em> and <em>y0[i+1]</em>:</p>
<div class="highlight-python"><pre>row i: x y0 y1
/
/
row i+1: x y0 y1</pre>
</div>
<p>Hence y0 in the first row and y1 in the last row are never used.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p><a class="reference internal" href="#matplotlib.colors.LinearSegmentedColormap.from_list" title="matplotlib.colors.LinearSegmentedColormap.from_list"><tt class="xref py py-meth docutils literal"><span class="pre">LinearSegmentedColormap.from_list()</span></tt></a>
Static method; factory function for generating a
smoothly-varying LinearSegmentedColormap.</p>
<p class="last"><a class="reference internal" href="#matplotlib.colors.makeMappingArray" title="matplotlib.colors.makeMappingArray"><tt class="xref py py-func docutils literal"><span class="pre">makeMappingArray()</span></tt></a>
For information about making a mapping array.</p>
</div>
<dl class="staticmethod">
<dt id="matplotlib.colors.LinearSegmentedColormap.from_list">
<em class="property">static </em><tt class="descname">from_list</tt><big>(</big><em>name</em>, <em>colors</em>, <em>N=256</em>, <em>gamma=1.0</em><big>)</big><a class="headerlink" href="#matplotlib.colors.LinearSegmentedColormap.from_list" title="Permalink to this definition">¶</a></dt>
<dd><p>Make a linear segmented colormap with <em>name</em> from a sequence
of <em>colors</em> which evenly transitions from colors[0] at val=0
to colors[-1] at val=1. <em>N</em> is the number of rgb quantization
levels.
Alternatively, a list of (value, color) tuples can be given
to divide the range unevenly.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.LinearSegmentedColormap.set_gamma">
<tt class="descname">set_gamma</tt><big>(</big><em>gamma</em><big>)</big><a class="headerlink" href="#matplotlib.colors.LinearSegmentedColormap.set_gamma" title="Permalink to this definition">¶</a></dt>
<dd><p>Set a new gamma value and regenerate color map.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="matplotlib.colors.ListedColormap">
<em class="property">class </em><tt class="descclassname">matplotlib.colors.</tt><tt class="descname">ListedColormap</tt><big>(</big><em>colors</em>, <em>name='from_list'</em>, <em>N=None</em><big>)</big><a class="headerlink" href="#matplotlib.colors.ListedColormap" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matplotlib.colors.Colormap" title="matplotlib.colors.Colormap"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.Colormap</span></tt></a></p>
<p>Colormap object generated from a list of colors.</p>
<p>This may be most useful when indexing directly into a colormap,
but it can also be used to generate special colormaps for ordinary
mapping.</p>
<p>Make a colormap from a list of colors.</p>
<dl class="docutils">
<dt><em>colors</em></dt>
<dd>a list of matplotlib color specifications,
or an equivalent Nx3 or Nx4 floating point array
(<em>N</em> rgb or rgba values)</dd>
<dt><em>name</em></dt>
<dd>a string to identify the colormap</dd>
<dt><em>N</em></dt>
<dd><p class="first">the number of entries in the map. The default is <em>None</em>,
in which case there is one colormap entry for each
element in the list of colors. If:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">N</span> <span class="o"><</span> <span class="nb">len</span><span class="p">(</span><span class="n">colors</span><span class="p">)</span>
</pre></div>
</div>
<p>the list will be truncated at <em>N</em>. If:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">N</span> <span class="o">></span> <span class="nb">len</span><span class="p">(</span><span class="n">colors</span><span class="p">)</span>
</pre></div>
</div>
<p class="last">the list will be extended by repetition.</p>
</dd>
</dl>
</dd></dl>
<dl class="class">
<dt id="matplotlib.colors.LogNorm">
<em class="property">class </em><tt class="descclassname">matplotlib.colors.</tt><tt class="descname">LogNorm</tt><big>(</big><em>vmin=None</em>, <em>vmax=None</em>, <em>clip=False</em><big>)</big><a class="headerlink" href="#matplotlib.colors.LogNorm" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matplotlib.colors.Normalize" title="matplotlib.colors.Normalize"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.Normalize</span></tt></a></p>
<p>Normalize a given value to the 0-1 range on a log scale</p>
<p>If <em>vmin</em> or <em>vmax</em> is not given, they are taken from the input’s
minimum and maximum value respectively. If <em>clip</em> is <em>True</em> and
the given value falls outside the range, the returned value
will be 0 or 1, whichever is closer. Returns 0 if:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">vmin</span><span class="o">==</span><span class="n">vmax</span>
</pre></div>
</div>
<p>Works with scalars or arrays, including masked arrays. If
<em>clip</em> is <em>True</em>, masked values are set to 1; otherwise they
remain masked. Clipping silently defeats the purpose of setting
the over, under, and masked colors in the colormap, so it is
likely to lead to surprises; therefore the default is
<em>clip</em> = <em>False</em>.</p>
<dl class="method">
<dt id="matplotlib.colors.LogNorm.autoscale">
<tt class="descname">autoscale</tt><big>(</big><em>A</em><big>)</big><a class="headerlink" href="#matplotlib.colors.LogNorm.autoscale" title="Permalink to this definition">¶</a></dt>
<dd><p>Set <em>vmin</em>, <em>vmax</em> to min, max of <em>A</em>.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.LogNorm.autoscale_None">
<tt class="descname">autoscale_None</tt><big>(</big><em>A</em><big>)</big><a class="headerlink" href="#matplotlib.colors.LogNorm.autoscale_None" title="Permalink to this definition">¶</a></dt>
<dd><p>autoscale only None-valued vmin or vmax</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.LogNorm.inverse">
<tt class="descname">inverse</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#matplotlib.colors.LogNorm.inverse" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="matplotlib.colors.NoNorm">
<em class="property">class </em><tt class="descclassname">matplotlib.colors.</tt><tt class="descname">NoNorm</tt><big>(</big><em>vmin=None</em>, <em>vmax=None</em>, <em>clip=False</em><big>)</big><a class="headerlink" href="#matplotlib.colors.NoNorm" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matplotlib.colors.Normalize" title="matplotlib.colors.Normalize"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.Normalize</span></tt></a></p>
<p>Dummy replacement for Normalize, for the case where we
want to use indices directly in a
<a class="reference internal" href="cm_api.html#matplotlib.cm.ScalarMappable" title="matplotlib.cm.ScalarMappable"><tt class="xref py py-class docutils literal"><span class="pre">ScalarMappable</span></tt></a> .</p>
<p>If <em>vmin</em> or <em>vmax</em> is not given, they are taken from the input’s
minimum and maximum value respectively. If <em>clip</em> is <em>True</em> and
the given value falls outside the range, the returned value
will be 0 or 1, whichever is closer. Returns 0 if:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">vmin</span><span class="o">==</span><span class="n">vmax</span>
</pre></div>
</div>
<p>Works with scalars or arrays, including masked arrays. If
<em>clip</em> is <em>True</em>, masked values are set to 1; otherwise they
remain masked. Clipping silently defeats the purpose of setting
the over, under, and masked colors in the colormap, so it is
likely to lead to surprises; therefore the default is
<em>clip</em> = <em>False</em>.</p>
<dl class="method">
<dt id="matplotlib.colors.NoNorm.inverse">
<tt class="descname">inverse</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#matplotlib.colors.NoNorm.inverse" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="matplotlib.colors.Normalize">
<em class="property">class </em><tt class="descclassname">matplotlib.colors.</tt><tt class="descname">Normalize</tt><big>(</big><em>vmin=None</em>, <em>vmax=None</em>, <em>clip=False</em><big>)</big><a class="headerlink" href="#matplotlib.colors.Normalize" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>A class which, when called, can normalize data into
the <tt class="docutils literal"><span class="pre">[0,</span> <span class="pre">1]</span></tt> interval.</p>
<p>If <em>vmin</em> or <em>vmax</em> is not given, they are taken from the input’s
minimum and maximum value respectively. If <em>clip</em> is <em>True</em> and
the given value falls outside the range, the returned value
will be 0 or 1, whichever is closer. Returns 0 if:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">vmin</span><span class="o">==</span><span class="n">vmax</span>
</pre></div>
</div>
<p>Works with scalars or arrays, including masked arrays. If
<em>clip</em> is <em>True</em>, masked values are set to 1; otherwise they
remain masked. Clipping silently defeats the purpose of setting
the over, under, and masked colors in the colormap, so it is
likely to lead to surprises; therefore the default is
<em>clip</em> = <em>False</em>.</p>
<dl class="method">
<dt id="matplotlib.colors.Normalize.autoscale">
<tt class="descname">autoscale</tt><big>(</big><em>A</em><big>)</big><a class="headerlink" href="#matplotlib.colors.Normalize.autoscale" title="Permalink to this definition">¶</a></dt>
<dd><p>Set <em>vmin</em>, <em>vmax</em> to min, max of <em>A</em>.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.Normalize.autoscale_None">
<tt class="descname">autoscale_None</tt><big>(</big><em>A</em><big>)</big><a class="headerlink" href="#matplotlib.colors.Normalize.autoscale_None" title="Permalink to this definition">¶</a></dt>
<dd><p>autoscale only None-valued vmin or vmax</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.Normalize.inverse">
<tt class="descname">inverse</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#matplotlib.colors.Normalize.inverse" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="staticmethod">
<dt id="matplotlib.colors.Normalize.process_value">
<em class="property">static </em><tt class="descname">process_value</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#matplotlib.colors.Normalize.process_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Homogenize the input <em>value</em> for easy and efficient normalization.</p>
<p><em>value</em> can be a scalar or sequence.</p>
<p>Returns <em>result</em>, <em>is_scalar</em>, where <em>result</em> is a
masked array matching <em>value</em>. Float dtypes are preserved;
integer types with two bytes or smaller are converted to
np.float32, and larger types are converted to np.float.
Preserving float32 when possible, and using in-place operations,
can greatly improve speed for large arrays.</p>
<p>Experimental; we may want to add an option to force the
use of float32.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.Normalize.scaled">
<tt class="descname">scaled</tt><big>(</big><big>)</big><a class="headerlink" href="#matplotlib.colors.Normalize.scaled" title="Permalink to this definition">¶</a></dt>
<dd><p>return true if vmin and vmax set</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="matplotlib.colors.SymLogNorm">
<em class="property">class </em><tt class="descclassname">matplotlib.colors.</tt><tt class="descname">SymLogNorm</tt><big>(</big><em>linthresh</em>, <em>linscale=1.0</em>, <em>vmin=None</em>, <em>vmax=None</em>, <em>clip=False</em><big>)</big><a class="headerlink" href="#matplotlib.colors.SymLogNorm" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matplotlib.colors.Normalize" title="matplotlib.colors.Normalize"><tt class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.Normalize</span></tt></a></p>
<p>The symmetrical logarithmic scale is logarithmic in both the
positive and negative directions from the origin.</p>
<p>Since the values close to zero tend toward infinity, there is a
need to have a range around zero that is linear. The parameter
<em>linthresh</em> allows the user to specify the size of this range
(-<em>linthresh</em>, <em>linthresh</em>).</p>
<p><em>linthresh</em>:
The range within which the plot is linear (to
avoid having the plot go to infinity around zero).</p>
<p><em>linscale</em>:
This allows the linear range (-<em>linthresh</em> to <em>linthresh</em>)
to be stretched relative to the logarithmic range. Its
value is the number of decades to use for each half of the
linear range. For example, when <em>linscale</em> == 1.0 (the
default), the space used for the positive and negative
halves of the linear range will be equal to one decade in
the logarithmic range. Defaults to 1.</p>
<dl class="method">
<dt id="matplotlib.colors.SymLogNorm.autoscale">
<tt class="descname">autoscale</tt><big>(</big><em>A</em><big>)</big><a class="headerlink" href="#matplotlib.colors.SymLogNorm.autoscale" title="Permalink to this definition">¶</a></dt>
<dd><p>Set <em>vmin</em>, <em>vmax</em> to min, max of <em>A</em>.</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.SymLogNorm.autoscale_None">
<tt class="descname">autoscale_None</tt><big>(</big><em>A</em><big>)</big><a class="headerlink" href="#matplotlib.colors.SymLogNorm.autoscale_None" title="Permalink to this definition">¶</a></dt>
<dd><p>autoscale only None-valued vmin or vmax</p>
</dd></dl>
<dl class="method">
<dt id="matplotlib.colors.SymLogNorm.inverse">
<tt class="descname">inverse</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#matplotlib.colors.SymLogNorm.inverse" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="matplotlib.colors.hex2color">
<tt class="descclassname">matplotlib.colors.</tt><tt class="descname">hex2color</tt><big>(</big><em>s</em><big>)</big><a class="headerlink" href="#matplotlib.colors.hex2color" title="Permalink to this definition">¶</a></dt>
<dd><p>Take a hex string <em>s</em> and return the corresponding rgb 3-tuple
Example: #efefef -> (0.93725, 0.93725, 0.93725)</p>
</dd></dl>
<dl class="function">
<dt id="matplotlib.colors.hsv_to_rgb">
<tt class="descclassname">matplotlib.colors.</tt><tt class="descname">hsv_to_rgb</tt><big>(</big><em>hsv</em><big>)</big><a class="headerlink" href="#matplotlib.colors.hsv_to_rgb" title="Permalink to this definition">¶</a></dt>
<dd><p>convert hsv values in a numpy array to rgb values
both input and output arrays have shape (M,N,3)</p>
</dd></dl>
<dl class="function">
<dt id="matplotlib.colors.is_color_like">
<tt class="descclassname">matplotlib.colors.</tt><tt class="descname">is_color_like</tt><big>(</big><em>c</em><big>)</big><a class="headerlink" href="#matplotlib.colors.is_color_like" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <em>True</em> if <em>c</em> can be converted to <em>RGB</em></p>
</dd></dl>
<dl class="function">
<dt id="matplotlib.colors.makeMappingArray">
<tt class="descclassname">matplotlib.colors.</tt><tt class="descname">makeMappingArray</tt><big>(</big><em>N</em>, <em>data</em>, <em>gamma=1.0</em><big>)</big><a class="headerlink" href="#matplotlib.colors.makeMappingArray" title="Permalink to this definition">¶</a></dt>
<dd><p>Create an <em>N</em> -element 1-d lookup table</p>
<p><em>data</em> represented by a list of x,y0,y1 mapping correspondences.
Each element in this list represents how a value between 0 and 1
(inclusive) represented by x is mapped to a corresponding value
between 0 and 1 (inclusive). The two values of y are to allow
for discontinuous mapping functions (say as might be found in a
sawtooth) where y0 represents the value of y for values of x
<= to that given, and y1 is the value to be used for x > than
that given). The list must start with x=0, end with x=1, and
all values of x must be in increasing order. Values between
the given mapping points are determined by simple linear interpolation.</p>
<p>Alternatively, data can be a function mapping values between 0 - 1
to 0 - 1.</p>
<p>The function returns an array “result” where <tt class="docutils literal"><span class="pre">result[x*(N-1)]</span></tt>
gives the closest value for values of x between 0 and 1.</p>
</dd></dl>
<dl class="attribute">
<dt id="matplotlib.colors.no_norm">
<tt class="descclassname">matplotlib.colors.</tt><tt class="descname">no_norm</tt><a class="headerlink" href="#matplotlib.colors.no_norm" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <a class="reference internal" href="#matplotlib.colors.NoNorm" title="matplotlib.colors.NoNorm"><tt class="xref py py-class docutils literal"><span class="pre">NoNorm</span></tt></a></p>
</dd></dl>
<dl class="attribute">
<dt id="matplotlib.colors.normalize">
<tt class="descclassname">matplotlib.colors.</tt><tt class="descname">normalize</tt><a class="headerlink" href="#matplotlib.colors.normalize" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <a class="reference internal" href="#matplotlib.colors.Normalize" title="matplotlib.colors.Normalize"><tt class="xref py py-class docutils literal"><span class="pre">Normalize</span></tt></a></p>
</dd></dl>
<dl class="function">
<dt id="matplotlib.colors.rgb2hex">
<tt class="descclassname">matplotlib.colors.</tt><tt class="descname">rgb2hex</tt><big>(</big><em>rgb</em><big>)</big><a class="headerlink" href="#matplotlib.colors.rgb2hex" title="Permalink to this definition">¶</a></dt>
<dd><p>Given an rgb or rgba sequence of 0-1 floats, return the hex string</p>
</dd></dl>
<dl class="function">
<dt id="matplotlib.colors.rgb_to_hsv">
<tt class="descclassname">matplotlib.colors.</tt><tt class="descname">rgb_to_hsv</tt><big>(</big><em>arr</em><big>)</big><a class="headerlink" href="#matplotlib.colors.rgb_to_hsv" title="Permalink to this definition">¶</a></dt>
<dd><p>convert rgb values in a numpy array to hsv values
input and output arrays should have shape (M,N,3)</p>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="dates_api.html" title="dates"
>next</a> |</li>
<li class="right" >
<a href="colorbar_api.html" title="colorbar"
>previous</a> |</li>
<li><a href="../index.html">home</a>| </li>
<li><a href="../examples/index.html">examples</a>| </li>
<li><a href="../gallery.html">gallery</a>| </li>
<li><a href="pyplot_summary.html">pyplot</a>| </li>
<li><a href="../contents.html">docs</a> »</li>
<li><a href="index.html" >The Matplotlib API</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2013 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the matplotlib development team.
Last updated on May 21, 2013.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1.
</div>
</body>
</html>