GenericMappingTools / GenericMappingTools/gmt

Plotting grids vertically

Open
#7,965 4 comments 0 reactions 3 assignees Claimed by @joa-quim View on GitHub
bug
Dominant language
C
Stars
979
Forks
414
Avg merge
17h 26m
Merged PRs (30d)
54

Description

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](https://github.com/GenericMappingTools/gmt/assets/26473567/c00a7114-b0f4-43aa-a7eb-aed63337020e)

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.

https://github.com/GenericMappingTools/gmt/assets/26473567/852ae319-ad30-412b-956c-3efd84a01916

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](https://github.com/GenericMappingTools/gmt/files/13063724/slice.grd.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.