slight style changes
This commit is contained in:
parent
2ce47e7013
commit
3e2c286936
1 changed files with 6 additions and 6 deletions
12
visualize.py
12
visualize.py
|
@ -8,7 +8,7 @@ from simulation_list import SimulationList
|
|||
|
||||
|
||||
def main():
|
||||
mcode, gamma, wt, wp = [10 ** 23, 0.7, 15/100, 15/100]
|
||||
mcode, gamma, wt, wp = [10 ** 23, 0.6, 15 / 100, 15 / 100]
|
||||
simlist = SimulationList.jsonlines_load()
|
||||
# for s in simlist.simlist:
|
||||
# if s.type!="original":
|
||||
|
@ -25,11 +25,11 @@ def main():
|
|||
scaler = CustomScaler()
|
||||
scaler.fit(data)
|
||||
scaled_data = scaler.transform_data(data)
|
||||
# interpolator = RbfInterpolator(scaled_data, values)
|
||||
interpolator = GriddataInterpolator(scaled_data, values)
|
||||
interpolator = RbfInterpolator(scaled_data, values)
|
||||
# interpolator = GriddataInterpolator(scaled_data, values)
|
||||
|
||||
alpharange = np.linspace(-0.5, 60.5, 100)
|
||||
vrange = np.linspace(0.5, 5.5, 100)
|
||||
alpharange = np.linspace(-0.5, 60.5, 300)
|
||||
vrange = np.linspace(0.5, 5.5, 300)
|
||||
grid_alpha, grid_v = np.meshgrid(alpharange, vrange)
|
||||
|
||||
parameters = [grid_alpha, grid_v, mcode, gamma, wt, wp]
|
||||
|
@ -39,7 +39,7 @@ def main():
|
|||
|
||||
plt.title("m={:3.0e}, gamma={:3.1f}, wt={:2.0f}%, wp={:2.0f}%\n".format(mcode, gamma, wt*100, wp*100))
|
||||
|
||||
# plt.contourf(grid_x, grid_y, grid_c, N, cmap="Blues", vmin=0, vmax=1)
|
||||
# plt.contourf(grid_alpha, grid_v, grid_result, 100, cmap="Blues", vmin=0, vmax=1)
|
||||
plt.pcolormesh(grid_alpha, grid_v, grid_result, cmap="Blues", vmin=0, vmax=1)
|
||||
plt.colorbar().set_label("water retention")
|
||||
# plt.scatter(data[:, 0], data[:, 1], c=values, cmap="Blues")
|
||||
|
|
Reference in a new issue