Added proper color gradient to position plot
This commit is contained in:
parent
9004125dd5
commit
965dd30665
1 changed files with 2 additions and 1 deletions
|
@ -115,6 +115,7 @@ ax0.legend(
|
|||
|
||||
# Experiment: Plot position
|
||||
import math
|
||||
import colorsys
|
||||
|
||||
segments = 100
|
||||
seg_length = math.ceil(len(position_over_time) / segments)
|
||||
|
@ -125,7 +126,7 @@ for i in range(0, segments):
|
|||
ax1.plot(
|
||||
horizontal[low:high],
|
||||
vertical[low:high],
|
||||
color=(0.0, 0.5, i / segments),
|
||||
color=colorsys.hsv_to_rgb(i / segments * 0.5, 1, 0.7),
|
||||
linewidth=0.3,
|
||||
)
|
||||
ax1.set_xlim((0, bed_size[0]))
|
||||
|
|
Loading…
Reference in a new issue