You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the functionality to recycle bits of PostScript in modern mode, e.g., make a common underlay base.ps and use it in different plots. I'm most interested in the basemap use case, but there also may be people who are interested in being able to add common overlays to many plots.
A pseudo-code example:
export GMT_SESSION_NAME=underlay
gmt begin
gmt basemap -JM6i -R-30/30/-30/30 -Bafg
unset GMT_SESSION_NAME
gmt begin -Dunderlay,overlay # duplicate underlay session to overlay
gmt plot ex1.txt -S -Cchrome
gmt end show
gmt begin -Dunderlay,overlay # duplicate underlay session to overlay
gmt plot ex2.txt -S -Cchrome
gmt end show
gmt begin -Dunderlay,overlay # duplicate underlay session to overlay
gmt plot ex3.txt -S -Cchrome
gmt end show
Are you willing to help implement and maintain this feature? Yes/No
Some of you may recall an early modern mode command called revert (revert.c now lives in exile in the sandbox just in case). It could strip off layers from the current plot. It seems a bit clutzy to me thought.
Here are quick thoughts on overlays/underlays
Plot what you consider a layer normally
Run gmt layer getname to make a named snapshot of current plot
When you want to add this layer to another plot, run gmt layer putname
To use it as an underlay (first layer) for a new figure, you just do gmt figure first then gmt layer putname
Layers are not tied to a figure, but tied to session, and may be used any number of times
Named layers die when the session ends
The verbs get and put can be discussed. We can discuss if calling get with the same name as before simply overwrites or if we refuse to do so without some -F force option or an intermediate gmt layer deletename command.
Some of you may recall an early modern mode command called revert (revert.c now lives in exile in the sandbox just in case). It could strip off layers from the current plot. It seems a bit clutzy to me thought.
Here are quick thoughts on overlays/underlays
1. Plot what you consider a layer normally
2. Run **gmt layer get** _name_ to make a named snapshot of current plot
3. When you want to add this layer to another plot, run **gmt layer put** _name_
4. To use it as an underlay (first layer) for a new figure, you just do **gmt figure** first then **gmt layer put** _name_
5. Layers are not tied to a figure, but tied to session, and may be used any number of times
6. Named layers die when the session ends
The verbs get and put can be discussed. We can discuss if calling get with the same name as before simply overwrites or if we refuse to do so without some -F force option or an intermediate gmt layer deletename command.
Given that the layers die when the session ends, it is not clear to me how you would finalize the figures without closing the session if, for example, you want to use the same layers when updating a plot every day, week, year, etc.
Activity
PaulWessel commentedon Mar 18, 2021
Some of you may recall an early modern mode command called revert (revert.c now lives in exile in the sandbox just in case). It could strip off layers from the current plot. It seems a bit clutzy to me thought.
Here are quick thoughts on overlays/underlays
The verbs get and put can be discussed. We can discuss if calling get with the same name as before simply overwrites or if we refuse to do so without some -F force option or an intermediate gmt layer delete name command.
maxrjones commentedon Mar 19, 2021
Given that the layers die when the session ends, it is not clear to me how you would finalize the figures without closing the session if, for example, you want to use the same layers when updating a plot every day, week, year, etc.
PaulWessel commentedon Mar 19, 2021
Perhaps we should convert this to a discussion item?