-
Notifications
You must be signed in to change notification settings - Fork 4
/
Color Palettes
114 lines (93 loc) · 2.88 KB
/
Color Palettes
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
#Color Palettes in Seaborn and their application to data representations:
"""
Seaborn offers multiple colour palettes which can be used in collaboration
with your data plots in matplotlib to make eye catching data visuals
Following are the varied range of colour palettes that can be displayed
The following codes output them in a horizontal array (pyplot)
But, the same can be applied to any data representation form
"""
import matplotlib.pyplot as plt
import seaborn as sns
#: Basic Default Colour palette
palette = sns.color_palette()
sns.palplot(palette)
plt.show()
# Seaborn offers 6 different abstracts that can be applied to any palette
# Testing abstracts on default palette:
#1: Dark Default Colour palette
palette = sns.color_palette("dark")
sns.palplot(palette)
plt.show()
#2: Pastel (faded) Default Colour palette
palette = sns.color_palette("pastel")
sns.palplot(palette)
plt.show()
#3: Deep Default Colour palette
palette = sns.color_palette("deep")
sns.palplot(palette)
plt.show()
#4: Muted Default Colour palette
palette = sns.color_palette("muted")
sns.palplot(palette)
plt.show()
#5: Colorblind Default Colour palette
palette = sns.color_palette("colorblind")
sns.palplot(palette)
plt.show()
#6: Bright Default Colour palette
palette = sns.color_palette("bright")
sns.palplot(palette)
plt.show()
#: Colour Scheme Specific Palettes:
palette = sns.color_palette("Blues")
sns.palplot(palette)
plt.show()
# The various shades of Blue colour will be displayed in a light to dark order
# A similar palette can be made for other colours (Orange, Purple, Green, Red)
# Be sure to add a 's' after the colour name and capitalize the first letter
#: Perceptually uniform palettes:
# Using any of 6 specified color-maps,light to dark or dark to light heatmaps are displayed
# All these heatmaps can be reversed by trailing thier name with a "_r"
#1: rocket
palette = sns.color_palette("rocket")
sns.palplot(palette)
plt.show()
#2: mako
palette = sns.color_palette("mako")
sns.palplot(palette)
plt.show()
#3: flare
palette = sns.color_palette("flare")
sns.palplot(palette)
plt.show()
#4: crest
palette = sns.color_palette("crest")
sns.palplot(palette)
plt.show()
#5: magma
palette = sns.color_palette("magma")
sns.palplot(palette)
plt.show()
#6: viridis
palette = sns.color_palette("viridis")
sns.palplot(palette)
plt.show()
#: Diverging Colour Palettes:
# Dark from either side, but converge into the center towards a lighter/white spectra or vice versa
#1: vlag: dark to light
palette = sns.color_palette("vlag")
sns.palplot(palette)
plt.show()
#2: icefire: light to dark
palette = sns.color_palette("icefire")
sns.palplot(palette)
plt.show()
#3: coolwarm : Blue & Red
palette = sns.color_palette("coolwarm")
sns.palplot(palette)
plt.show()
#: Rainbow Palette:
palette = sns.color_palette("Spectral")
sns.palplot(palette)
plt.show()
#________________________________________________________________________________________