Adjustments to plotting ranges.

这个提交包含在:
Craig Warren
2015-12-22 17:39:53 +00:00
父节点 2f633d33dc
当前提交 248f8d011a

查看文件

@@ -232,6 +232,7 @@ def plot_optimisation_history(fitnessvalueshist, optparamshist, optparamsinit):
fig, ax = plt.subplots(subplot_kw=dict(xlabel='Iterations', ylabel='Fitness value'), num='History of fitness values', figsize=(20, 10), facecolor='w', edgecolor='w') fig, ax = plt.subplots(subplot_kw=dict(xlabel='Iterations', ylabel='Fitness value'), num='History of fitness values', figsize=(20, 10), facecolor='w', edgecolor='w')
iterations = np.arange(1, len(fitnessvalueshist) + 1) iterations = np.arange(1, len(fitnessvalueshist) + 1)
ax.plot(iterations, fitnessvalueshist, 'r', marker='.', ms=15, lw=1) ax.plot(iterations, fitnessvalueshist, 'r', marker='.', ms=15, lw=1)
ax.set_xlim(1, len(fitnessvalueshist) + 1)
ax.grid() ax.grid()
# Plot history of optimisation parameters # Plot history of optimisation parameters
@@ -239,6 +240,7 @@ def plot_optimisation_history(fitnessvalueshist, optparamshist, optparamsinit):
for key, value in optparamshist.items(): for key, value in optparamshist.items():
fig, ax = plt.subplots(subplot_kw=dict(xlabel='Iterations', ylabel='Parameter value'), num='History of ' + key + ' parameter', figsize=(20, 10), facecolor='w', edgecolor='w') fig, ax = plt.subplots(subplot_kw=dict(xlabel='Iterations', ylabel='Parameter value'), num='History of ' + key + ' parameter', figsize=(20, 10), facecolor='w', edgecolor='w')
ax.plot(iterations, optparamshist[key], 'r', marker='.', ms=15, lw=1) ax.plot(iterations, optparamshist[key], 'r', marker='.', ms=15, lw=1)
ax.set_xlim(1, len(value) + 1)
ax.set_ylim(optparamsinit[p][1][0], optparamsinit[p][1][1]) ax.set_ylim(optparamsinit[p][1][0], optparamsinit[p][1][1])
ax.grid() ax.grid()
p += 1 p += 1