Plotting cross section through 3d scatter plot in python
<p>I have a simple script, that plots lat,lon and depth of points in 3D.
Is there a python module or some simple solution I could use to get a cross section over this points?</p>

<p>Cross section should be a vertical plane, for which I would set two coordinates (in plane view), depth and thickness (how many km in each direction perpendicular to the cross sections I want the data).</p>

<p>So something like point1(lat1,lon1), point2(lat2,lon2), depthmin, depthmax, thicknes</p>

<pre><code>from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt

lats=[]
lons=[]
depts=[]

file_open=open("catZMAPVpVs")
for fo in file_open:
  element=fo.split("\t")
  lons.append(float(element[0]))
  lats.append(float(element[1]))
  depts.append(-float(element[6]))


fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

ax.scatter(lons,lats, depts, c='r', marker='o')

ax.set_xlabel('lon')
ax.set_ylabel('lat')
ax.set_zlabel('depth')
plt.show()
</code></pre>

<p>thanks!</p>