# Incorporate the depths of earthquakes in the map

**URL:** <https://forum.generic-mapping-tools.org/t/incorporate-the-depths-of-earthquakes-in-the-map/2172>\
**Category:** PyGMT Q&A\
**Created:** [October 7, 2021, 7:04am UTC](https://forum.generic-mapping-tools.org/t/incorporate-the-depths-of-earthquakes-in-the-map/2172 "2021-10-07T07:04:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dorotdot](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dorotdot](https://forum.generic-mapping-tools.org/u/dorotdot)\
**Post date:** [October 7, 2021, 7:04am UTC](https://forum.generic-mapping-tools.org/t/incorporate-the-depths-of-earthquakes-in-the-map/2172/1 "2021-10-07T07:04:39Z")

</div>

How do I include the depths of the plotted quakes on the map? And is it possible to view it in a cross-section? I’ve changed the values of my depths into negative but its still the same.

 ![3d](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/0/0da8d7771519f8d7f32bb8b4415fadd81b89dda2.png)

df = pd.read\_csv(‘Eq.txt’)

grid = pygmt.datasets.load\_earth\_relief(resolution=“30s”, region=[120.000,121.000,13.275,14.364,-200,0])

fig = pygmt.Figure()  
fig.grdview(  
grid=grid,  
perspective=[-200,20],  
frame=[“xaf”, “yaf”, “SE”],  
projection=“M20c”,  
zsize=“1.5c”,  
surftype=“s”,  
cmap=“geo”,  
plane=“1000+ggrey”,  
contourpen=“0.1p”,  
)

fig.plot3d(  
x =df.lon,  
y =df.lat,  
z =df.dep,  
style =‘c0.2c’,  
color=‘red’,  
pen = ‘black’,  
)

fig.savefig(“3d.png”)

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [October 7, 2021, 11:06am UTC](https://forum.generic-mapping-tools.org/t/incorporate-the-depths-of-earthquakes-in-the-map/2172/2 "2021-10-07T11:06:16Z")

</div>

Not sure but try to add perspective=[-200,20] below in fig.plo3d also.

---

<div class="post-metadata">

**Author:** ![dorotdot](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dorotdot](https://forum.generic-mapping-tools.org/u/dorotdot)\
**Post date:** [October 8, 2021, 3:09am UTC](https://forum.generic-mapping-tools.org/t/incorporate-the-depths-of-earthquakes-in-the-map/2172/3 "2021-10-08T03:09:16Z")

</div>

It works! Thank you!. So the first perspective=[-200,20] applies only for the basemap and not for the whole map figure.

But I have one last question, how do I make the points(circles) in 3d? Because when I change the perspective (ex. -200,5) it only shows the side view of the circles.
