-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplots.py
executable file
·40 lines (35 loc) · 1.38 KB
/
plots.py
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
from matplotlib import cm
from matplotlib.colors import ListedColormap,LinearSegmentedColormap
import numpy as np
import torch
import matplotlib.pyplot as plt
def plot_source (graph):
hsv_modified = cm.get_cmap('twilight', 256) # create new hsv colormaps in range of 0.3 (green) to 0.7 (blue)
newcmp = ListedColormap(hsv_modified(np.linspace(0.55, 0.88, 100000)))
plt.figure()
# trie = np.ma.masked_where(trie == 0, trie)
newcmp.set_bad(color="#631120")
plt.pcolormesh(graph, cmap=newcmp)
plt.ylim(35, 0)
plt.colorbar()
return plt.show()
def plot_target1 (graph):
hsv_modified = cm.get_cmap('twilight', 256) # create new hsv colormaps in range of 0.3 (green) to 0.7 (blue)
newcmp = ListedColormap(hsv_modified(np.linspace(0.55, 0.88, 100000)))
plt.figure()
# trie = np.ma.masked_where(trie == 0, trie)
newcmp.set_bad(color="#631120")
plt.pcolormesh(graph, cmap=newcmp)
plt.ylim(160, 0)
plt.colorbar()
return plt.show()
def plot_target2 (graph):
hsv_modified = cm.get_cmap('twilight', 256) # create new hsv colormaps in range of 0.3 (green) to 0.7 (blue)
newcmp = ListedColormap(hsv_modified(np.linspace(0.55, 0.88, 100000)))
plt.figure()
# trie = np.ma.masked_where(trie == 0, trie)
newcmp.set_bad(color="#631120")
plt.pcolormesh(graph, cmap=newcmp)
plt.ylim(268, 0)
plt.colorbar()
return plt.show()