Skip to content

Commit

Permalink
Improved plotting scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jmiszczak committed Nov 5, 2023
1 parent d667325 commit 9a0a696
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions min-roaming-random-patches_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
# Note: header=6 is for NetLogo data

# experiment name
exp_desc = 'min-roaming-random-patches-small-150'
# exp_desc = 'min-roaming-random-patches-l64-even'
# exp_desc = 'min-roaming-random-patches-small-150'
exp_desc = 'min-roaming-random-patches-l64-even'
# exp_desc = 'min-roaming-random-patches-medium'

# variables usd in the plots
Expand All @@ -34,7 +34,7 @@
var0s = data[v[0]].unique()
var1s = data[v[1]].unique()
var2s = data[v[2]].unique()
var0s = np.array([4,8,10,12])
# var0s = np.array([4,6,8,10,12])

# %% preprocess
for v0 in var0s:
Expand All @@ -49,6 +49,8 @@


#%% plot
var0s = np.array([4,8,10,12])

# levels for contour plot
# levels = list(map( lambda x : x/10, list(range(0,11))))

Expand Down Expand Up @@ -131,11 +133,12 @@
fig.savefig(fName, format="pdf", bbox_inches='tight')

#%% min delta
var0s = np.array([4,6,8,10,12])
data_md = dict()
data_max1 = dict()
data_max2 = dict()
thr1 = 0.95
thr2 = 0.97
thr1 = 0.90
thr2 = 0.98
pm = lambda x : '-' if x < a else '+'


Expand Down
4 changes: 2 additions & 2 deletions random-local-roaming_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#%% plot
# leves for contour plot
# levels = list(map( lambda x : x/20, list(range(0,23))))
levels = [0.0, 0.1, 0.5, 0.95, 0.98, 1.0]
levels = [0.0, 0.1, 0.5, 0.95, 0.98, 1.0]


# color map for contour plot
Expand Down Expand Up @@ -145,7 +145,7 @@
data_max1 = dict()
data_max2 = dict()
thr1 = 0.95
thr2 = 0.97
thr2 = 0.99

for k in var0s:
data_md[k] = df[df[v[0]] == k][[v[1], v[2], v[3]]]
Expand Down

0 comments on commit 9a0a696

Please sign in to comment.