Im using pygmt and I was able to plot this great 3d perspective of my studies area, but I want to know how can I plot a 3d scatter of points where I collected information over this first plot. I have the Long, Lat and Altitude of those points, that I have to use as x,y,z, and I want them to have a single color, I just want to visualize them over the 3d perspective. How can I make that?
Hi and welcome to the GMT forum.
I assume you are using something like this from the PyGMT tutorial to plot the 3D perspective of the surface:
fig = pygmt.Figure()
fig.grdview(
grid=grid,
perspective=perspect,
#frame=["xa", "yaf", "WSnE"],
projection="M10c",
region=reg_plot,
zsize="1.5c",
plane="0",
surftype="s",
cmap="geo",
)
You should be able to plot 3D scatter of points on top of this with something like:
fig.plot3d(
x=-99.93,
y=16.78,
z=0,
style="c0.25c",
color='red',
pen="thick",
perspective=perspect,
)
The above command plots a single x,y,z point, but you could use arrays for the x, y, and z values.
++Eric
2 Likes