mirror of
https://github.com/pim-n/pg-rad
synced 2026-07-01 17:49:33 +02:00
improve plotting functionality
This commit is contained in:
@ -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]")
|
||||
|
||||
Reference in New Issue
Block a user