improve plotting functionality

This commit is contained in:
Pim Nelissen
2026-03-30 08:23:02 +02:00
parent 8098ab9329
commit 0a60bb09e9
2 changed files with 14 additions and 14 deletions

View File

@ -58,12 +58,7 @@ class LandscapeSlicePlotter:
ax.set_xlim(right=max(width, .5*height))
# if the road is very flat, we center it vertically (looks better)
if median(landscape.path.y_list) == 0:
h = max(height, .5*width)
ax.set_ylim(bottom=-h//2,
top=h//2)
else:
ax.set_ylim(top=max(height, .5*width))
ax.set_ylim(bottom=-.5*width, top=.5*width)
ax.set_xlabel("X [m]")
ax.set_ylabel("Y [m]")