GenericMappingTools / GenericMappingTools/gmt
3-D perspective views in subplots
- Dominant language
- C
- Stars
- 979
- Forks
- 414
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 54
Description
Subplot expects information about panel size via **-S**. however, for 3-D perspective views it appears as these have little effect. This is related to the earlier fix #6516 for placement of colorbars. For instance, here is a 2x1 plot:

It is similar: **subplot** uses the **-R -J** of the equivalent 2-D plot (-R-32/52/-32/32 -Jx0.2c) and that gives a 16.8 x 16.8 cm square plot. That is why there is so much white space. To confirm I can run the same script with -p180/90 and get

So here we see that spacing is honored but it is always calculated as if a 2-D flat plot. I think what we want is the following:
When a perspective plot is desired for a panel, the fitting of the plot inside the given space needs a special check: We must compute the 3-D box and its 2-D coordinates and use that bounding box as the equivalent 2-D plot region. We can now shrink that to fit the panel. Then, that shrink factor can be applied to the 3-D projection as well.
In my case, I would have to select a **-Fs** with a short height. Now, we can debate if one should be able to say
`gmt subplot begin -Rw/e/s/n -JM15c -p130/20 -Fs15c/0`
and have **subplot** compute that height for us. I think that would be desirable. Thoughts?
Contributor guide
Assessment
This issue has not been assessed yet.