Skip to content

Commit

Permalink
update plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatminh committed Jul 5, 2018
1 parent 761e107 commit b6b28de
Show file tree
Hide file tree
Showing 41 changed files with 54 additions and 5 deletions.
Binary file modified __pycache__/Setting.cpython-36.pyc
Binary file not shown.
Binary file modified data.h5
Binary file not shown.
Binary file modified figs/Scale_obj_E.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figs/Scale_obj_T.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figs/Sub1_N.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figs/Sub1_T.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figs/Sub2_Tau.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figs/Sub2_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figs/Sub3_eq.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figs/Sub3_obj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions julia/Main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,10 @@ function main1()
end
end

# main()
plot_scale_result()
# for numb in Numb_devs
# global NumbDevs = numb
# main()
# end

main()
# plot_scale_result()
2 changes: 1 addition & 1 deletion julia/Plots_Figs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ end

function plot_scale_result()
Numb_kaps = size(kaps)[1]
Sims = 5
Sims = size(Numb_devs)[1]
Thetas = zeros(Sims, Numb_kaps)
Objs = zeros(Sims, Numb_kaps)
Objs_E = zeros(Sims, Numb_kaps)
Expand Down
5 changes: 3 additions & 2 deletions julia/Setting.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using Distributions
using HDF5

NumbDevs = 20 #1, 5, 10, 15, 20
Numb_devs = [1, 5, 10, 15, 20] #[1, 3, 5, 7, 10, 13, 15, 17, 20]
NumbDevs = 5 #1, 5, 10, 15, 20
# Numb_devs = [1, 5, 10, 15, 20]
# Numb_devs = collect(1:15)

### PROGRAM SETTING ###
Numb_SIMs = 1 #Number of simulations
Expand Down
Binary file modified result1.h5
Binary file not shown.
Binary file added result11.h5
Binary file not shown.
Binary file added result12.h5
Binary file not shown.
Binary file added result13.h5
Binary file not shown.
Binary file added result14.h5
Binary file not shown.
Binary file added result2.h5
Binary file not shown.
Binary file added result3.h5
Binary file not shown.
Binary file added result4.h5
Binary file not shown.
Binary file modified result5.h5
Binary file not shown.
Binary file added result6.h5
Binary file not shown.
Binary file added result7.h5
Binary file not shown.
Binary file added result8.h5
Binary file not shown.
Binary file added result9.h5
Binary file not shown.
Binary file modified scaleRS/result1.h5
Binary file not shown.
Binary file added scaleRS/result11.h5
Binary file not shown.
Binary file added scaleRS/result12.h5
Binary file not shown.
Binary file added scaleRS/result13.h5
Binary file not shown.
Binary file added scaleRS/result14.h5
Binary file not shown.
Binary file added scaleRS/result2.h5
Binary file not shown.
Binary file added scaleRS/result3.h5
Binary file not shown.
Binary file added scaleRS/result4.h5
Binary file not shown.
Binary file modified scaleRS/result5.h5
Binary file not shown.
Binary file added scaleRS/result6.h5
Binary file not shown.
Binary file added scaleRS/result7.h5
Binary file not shown.
Binary file added scaleRS/result8.h5
Binary file not shown.
Binary file added scaleRS/result9.h5
Binary file not shown.
Binary file modified setting.h5
Binary file not shown.
43 changes: 43 additions & 0 deletions temp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib import cm

result=[['122', '109', '2343', '220', '19'],
['15', '407', '37', '10', '102'],
['100', '100', '100', '100', '100'],
['113', '25', '19', '31', '112'],
['43', '219', '35', '33', '14'],
['132', '108', '256', '119', '14'],
['22', '48', '352', '51', '438']]

result = np.array(result, dtype=np.int)

fig=plt.figure(figsize=(5, 5), dpi=150)
ax1=fig.add_subplot(111, projection='3d')

xlabels = np.array(['10/11/2013', '10/12/2013', '10/13/2013',
'10/14/2013', '10/15/2013'])
xpos = np.arange(xlabels.shape[0])
ylabels = np.array(['A1','C1','G1','M1','M2','M3','P1'])
ypos = np.arange(ylabels.shape[0])

xposM, yposM = np.meshgrid(xpos, ypos, copy=False)

zpos=result
zpos = zpos.ravel()

dx=0.5
dy=0.5
dz=zpos

ax1.w_xaxis.set_ticks(xpos + dx/2.)
ax1.w_xaxis.set_ticklabels(xlabels)

ax1.w_yaxis.set_ticks(ypos + dy/2.)
ax1.w_yaxis.set_ticklabels(ylabels)

values = np.linspace(0.2, 1., xposM.ravel().shape[0])
colors = cm.rainbow(values)
ax1.bar3d(xposM.ravel(), yposM.ravel(), dz*0, dx, dy, dz, color=colors)
plt.show()

0 comments on commit b6b28de

Please sign in to comment.