I have a dataset with x, y and z data. I want to visualize it in a way to show z height variance as well using matplotlib.
PS: I’m trying to visualize racing tracks for analysis
This is my current code and results, but it doesn’t show anything about the Z data
fig, ax = plt.subplots(sharex=True, sharey=True, figsize=(8, 6))
plt.subplots_adjust(left=0.1, right=0.9, top=0.9, bottom=0.12)
ax.axis('off')
# creating track line
ax.plot(lap.telemetry['X'], lap.telemetry['Y'] ,
color='grey', linestyle='-', linewidth=5, zorder=0)
I’ve also tried playing around with the trisurf plotting, which gives depth, but doesn’t distinguish between them
ax = fig.add_subplot(111, projection='3d', )
ax.plot_trisurf(lap.telemetry['X'], lap.telemetry['Y'], lap.telemetry['Z'],
color='white', alpha=1)