In [1]:
from model import MovementPlanner
import matplotlib.pyplot as plt
In [2]:
mp = MovementPlanner(4,n_points=100)
In [3]:
gamma0 = mp.expected_gain_landscape(reward=100,penalty=0)
gamma100 = mp.expected_gain_landscape(reward=100,penalty=-100)
gamma500 = mp.expected_gain_landscape(reward=100,penalty=-500)
In [6]:
fig = plt.figure()
ax = fig.gca()
mp.heat_map(data=gamma100,ax=ax,plot_targets=True)
plt.show()
In [7]:
fig = plt.figure(figsize=(10,4))
ax = fig.add_subplot(1,3,1)
mp.heat_map(data=gamma0, ax=ax,plot_targets=True,vmin=-100,vmax=100)
ax = fig.add_subplot(1,3,2)
mp.heat_map(data=gamma100,ax=ax,plot_targets=True,vmin=-100,vmax=100)
ax = fig.add_subplot(1,3,3)
mp.heat_map(data=gamma500,ax=ax,plot_targets=True,vmin=-100,vmax=100)
plt.show()
In [10]:
fig = plt.figure(figsize=(10,4))
ax = fig.gca(projection='3d')
mp.surf_plot(ax=ax,data=gamma100,azim=220,elev=40,vrange=(-100,100))
plt.show()
In [12]:
fig = plt.figure(figsize=(10,4))
ax = fig.add_subplot(1,3,1,projection='3d')
mp.surf_plot(ax=ax,data=gamma0,azim=220,elev=40, vrange=(-100,100))
plt.title('Penalty = 0')
plt.xlabel('Y angle (degrees)')
plt.ylabel('Z angle (degrees)')
ax = fig.add_subplot(1,3,2,projection='3d')
mp.surf_plot(ax=ax,data=gamma100,azim=220,elev=40, vrange=(-100,100))
plt.title('Penalty = 100')
plt.xlabel('Y angle (degrees)')
plt.ylabel('Z angle (degrees)')
ax = fig.add_subplot(1,3,3,projection='3d')
mp.surf_plot(ax=ax,data=gamma500,azim=220,elev=40, vrange=(-100,100))
plt.title('Penalty = 500')
plt.xlabel('Y angle (degrees)')
plt.ylabel('Z angle (degrees)')
plt.show()
In [ ]:
help(ax.plot_surface)
In [ ]: