0

I am unable to draw a wireframe (not a map) with Lat, Lon and Alt. My data looks like this:

        latitude    longitude   altitude
    0   53.65947    -1.43819    14525
    1   53.65956    -1.43921    14525
    2   53.65979    -1.44066    14500
    3   53.66025    -1.44447    14475
    4   53.66044    -1.44591    14475

Here is what I have so far:

from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import matplotlib.animation as animation

df = pd.read_csv('/home/luke/Downloads      /dump1090-127_0_0_1-170911.txt', sep=',',skiprows=0, low_memory=False)

y = df['latitude']
x = df['longitude']
z = df['altitude']

plt.xticks(range(-3,0))
plt.yticks(range(50,60))
ax = plt.axes(projection='3d')
df1 = df1.dropna()

Help would be greatly appreciated.

Bill
  • 10,323
  • 10
  • 62
  • 85

1 Answers1

0

The reason your code is not plotting anything is that it isn't complete. You haven't included a plot command.

Suggest reading the documentation and looking at examples when you are trying to do something new.

In the example linked to above, you will see that the plot3D command is used to actually make the plot. If you add this to your code it should work.

ax.plot3D(x, y, z)
plt.show()

Also, note that a 3D wireframe plot is something different. I'm not sure it would be useful for plotting the path of an aeroplane.

Bill
  • 10,323
  • 10
  • 62
  • 85