Skip to content

Plotting grids vertically #7965

@PaulWessel

Description

@PaulWessel

Not sure if this is a bug or a feature, @remkos. For last AGU I made a movie showing a model the 3-D density structure of the Emperor Seamounts. The snapshot below shows one frame of that movie, and in the movie the y-coordinate goes from -150 to +150 and shows a slice through the 3-D model (here for y = -84 km drawn as a straight line):

Movie_density_3D

Because the laborious way I plotted (the initial model is actually a huge stack of ~5 million prisms with values changing every 25 m vertically and plotted with plot3d), I have made e a 3-D netCDF cube instead. Now I need to slice that cube vertically along different y values (thus parallel to x) and plot these grids instead. Such slicing was added to grdcut today and an example of use is gmt grdcut Emperor_Density_Cube.nc -Ey-84 -Gslice.grd. Since the grid is rho (x,z) I want to plot it vertically, so looking at -py for doing that. That does work but not the way I need it to work. Each slice should plot at the different y-values but as you see from the movie below, all frames plot at y == ymin.

Movie-Slice-3D.mp4

Did you ever implement a way to specify which yz or xz plane we could use? I know -pz or (just -p since z is the default) optionally takes a level and that plots things at that level. Do you think it would be hard to allow specifying an optional y=value plane? I attach a slice at y = 0 in case you need a test script:

gmt grdimage slice.grd -Jx0.0098c/0.00098c -py165/30 -Baf -Bzaf -BESltZ -png slice

slice.grd.zip

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions