Skip to content
Snippets Groups Projects
Unverified Commit 78253788 authored by Benjamin Loison's avatar Benjamin Loison
Browse files

Making targets and compress score curves being displayed with a logarithmic scale

parent 7bb1ca9c
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ fig, targetsAxis = plt.subplots()
fig.subplots_adjust(right = 0.8)
axes = [targetsAxis, targetsAxis.twinx(), targetsAxis.twinx()]
targets = [math.log2(target) for target in data['targets']]
targets = data['targets']#[math.log2(target) for target in data['targets']]
for x, (target, nextTarget) in enumerate(zip(targets, targets[1:])):
if nextTarget < target:
......@@ -35,16 +35,18 @@ curves = []
for axis, color, label, yValues in zip(axes, axesColors, axesLabels, axesYValues):
curves += axis.plot(yValues, label = label, color = color)
axes[1].spines.right.set_position(('axes', 1.1))
targetsAxis.set_yscale('log')
axes[2].spines.right.set_position(('axes', 1.1))
axes[2].set_yscale('log')
legendNewLine = ax1.plot([], [], color='none', label=' ')
legendNewLine = targetsAxis.plot([], [], color='none', label=' ')
curves += legendNewLine + targetRecomputationCurve + [firstTargetDecreaseCurve] + [targetIncreaseCurve]
labels = [curve.get_label() for curve in curves]
plt.legend(curves, labels, loc='upper center', framealpha=1)
ax1.set_xlabel('Block height')
targetsAxis.set_xlabel('Block height')
for ax, color in zip(axes, axesColors):
ax.tick_params(axis='y', colors=color)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment