-
Notifications
You must be signed in to change notification settings - Fork 382
Let gmt.history and gmt.conf be hierarchical and separate for panels and figures #3523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We do not want an automatic region determined for one panel to apply to another panel.
Fix the inset stuff.
Still to do:
I suggest @joa-quim and @seisman try this branch, I have tested it on things like this and the levels work. If you run one command at the time and monitor what is happening in the .gmt/sessions/gmt_session.* directory you will see many gmt.conf and gmt.history files now come and go at the right times. The example below sets a figure-level title font (not used), then a subplot-level font (used for all panels), except overridden for one panel. One panel also overrides the interpolant to be cubic but it is back to being Akima at a later panel: #!/usr/bin/env bash
|
I can tell we have not converged on a modern font selection. And @KristofKoch has gone quiet and not here to defend it. I will see what I need to do to strengthen the implementation but it seems straightforward. Oh, I cut/paste the last plot call after subplot end! I will edit the script next. |
Script updated. I will work on documentation for all of this and the 11 failing tests due to "wrong" syntax. |
Data stops at 40, no? |
Yes, so it seems. Had not looked at it since first run. |
@joa-quim beauty is in the eye of the beholder. What makes you prefer the Times-Roman font? I wrote a lengthy comment over at 3344 why I prefer a sans-serif font and backed it with the NASA Technical Report "On the typography of flight-deck documentation"; especially chapter 3.2 "Typeface (Fonts)".
Source: chapter 3.2 "Typeface (Fonts)", NASA-CR-177605 As @PaulWessel was unhappy with Helvetica as the default GMT font (I still prefer it) the only other sans-serif option is the Avant Garde font family. This is if we stick to the default fonts. Maybe there is the possibility to include an open source font with GMT which appeals to all/most of us? Paul: I'm still alive - but the current COVID19 situation ties up almost all of my resources. |
We had several instances wehre we set -R in a panel expecting it to carry over to othre panels.
I am down to two failures: ex16 and ex18. What happens here is this sequence of events:
So, as usual, there are options to choose from to fix this:
This is not entirely black and white to me. In those examples, we do have plot region = data region so we would want a shared region. However, I can imagine entirely different cases where a surface call inadvertently picks up a -Rg plot region and spends forever. Here is an example from the (still pending) NASA proposal: We plan to let plotters be allowed to take input files like @earth_relief (i.e., no resolution specified) and we let GMT figure out what is the best given plot size. But we will not let producers have that capability. What the hell would grdfft @earth_relief be expected to do, for instance? So those modules need resolution. Same here I think: Leaving the data region undefined is not good, and all it takes is to specify it outside the subplot and now both plot and data regions will be set. Agree? |
I'm lost. The (one) problem in
line? What is the problem of it inherits the the -R from |
You are not lost - that is the line in ex18. The problem is one of coding - we currently do not allow a RP history to serve as RG history. However, one possibility is when a plot region is given via a data file (-R@AK_gulf_grav.nc, -Rmygrid.grd). Since those are data domains perhaps that is a reasonable rule to add? It means determining if the -R argument in RP history is a file and not w/e/s/n. |
Well, @KristofKoch you are 100% right. It's in my eyes. I guess that I don't like |
Before I forget: We are please that @KristofKoch is still alive! And yes we understand very well what you are up against. |
You mean |
Yes it would. Maybe this is such a frequently occurring situation that we should accept any -R given to subplot (and only subplot) to serve both as plot region and data region unless overridden below. I think this is the only situation where this could make sense. |
Thinking some more about this, I think letting subplot -R set both data region and plot region makes sense. If you have another data region in mind in that context you can specify that separately on the modules before or after subplot begin. What say you @seisman? I think that would add plenty of flexibility and avoid us changing those examples as well. |
Please comment on this @joa-quim before it is bedtime. |
Yes, at this time I agree that subplot -R should set both data and plot regions ... but it has been a very intense pair of days so mind changes are allowable. |
So that handles ex18, but not ex16: In that example, we are sharing the -R (now) for gridders and plotters, but in the first panel we run |
Just moving the first surface call to before the first panel plot fixes the problem since now all grid settings (R, I, r) are shared at the subplot level. I think this is good. I will update subplot man page to explain how this works. |
Otherwise we are looking to find -R when not required or wanted.
New version is correct in that -Jx implies equal scaling so it should not scale x and y sepsrately.
I have completed this upgrade. After minor changes to some rouge scripts, all test pass as before minus the 2 known. Implementing the hierarchical scheme for history and conf was useful and found a few problems in the C code as well as bad scripting. Please check and approve, @joa-quim and @seisman . Closes #3520. |
Just tried a little with this branch. I would say it works as I expect. Here are some comments:
|
Only common options are remembered, but we learned the hard way that for grids we kind of need not only region and registration, but also increment. Since -I was never a common option (think -I in grdimage), I made grid increments behave that way in the history. |
Co-authored-by: Dongdong Tian <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
We do not want an automatic region determined for one panel to apply to another panel.
This addresses #3520 but still needs some more work. It also extends this idea to gmt.conf which now is also hierarchical. Hence, current cpt, settings and history are now all hierachical. This leaves us with ~12 failures due to syntax that is now incorrect.