-
Notifications
You must be signed in to change notification settings - Fork 361
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
Adding plot margin via psconvertoptions fails in modern mode #5582
Comments
See #5582 for background. This minor change allows the margins and other settings such as +g, +f, etc.
Perhaps this is a better description of the problem. The current -A has a mix of crop-related and non-crop-related modifiers. A backwards-compatible change that would clarify matters might introduce a new option -N which takes the non-crop-related modifiers:
This solution eliminates the awkward -A+n where +n negates the crop implied by -A in the first place... It would be easy to detect this new format since the revised -A is a subset of the current -A and -N is brand new. The default PS_CONVERT setting in modern mode would remain a "A" (we crop to BB) and in my case of wanting to retain the media size and expand I would pass "N+m0.2i" instead of "A". Let me know if you see any problems here, especially @joa-quim. |
This seems good to me, though it could be even cleaner to have one for crop, one for extend, and one for design. Downside is that there are not many more letters available.
|
There already is a -I option in there but it seems dated now (gs at 9.54) and could be deprecated (we can still easily detect a modifier-less -I to mean to old thing). |
But I like the cleaner separations of functions. |
And, it keeps each option shorter and less complicated. |
We need some feedback from @joa-quim on the need for -I. I see it affects grayscales. Is it still relevant in 9.54 and beyond? |
I know that GMT's deprecation policy is backwards compatibility forever, but do warnings get added for changes such as these? I am wondering to find out how the wrappers can know about changes such as these, apart from rigorous tracking of the gmt repository. |
We are probably not doing this in a rigorous way. We use the
but I am not sure we always do, and those are only seen if you use -Vc. |
Perhaps we should search for those gmt_M_compat_check and make sure there is a COMPAT message, and vice versa. |
We added that -I because of a user brought it out in a kind of bug report and that -I was the response to it. I have no idea if that issue can still strike, though I suspect not. |
Would you be OK with a splitting of -A over -A, -N, -I? |
Yes. Would prefer to avoid -I because it's a nearly global option but we have little choice. |
* Let gmt end better handle -A args See #5582 for background. This minor change allows the margins and other settings such as +g, +f, etc. * Implement -A -I -N scheme Also fixed errors is the use of GMT_Report. * Fix typos * Update psconvert.rst * Update psconvert.rst * Remove notice
Closed as implemented |
This example shows the problem:
Here, map1.jpg does not have the 0.2i margin added despite giving A+m0.2i to the figure command, whereas map2.jpg gets it by running psconvert separately. So the problem must lie somewhere in how the figure argument is eventually passed to psconvert via gmt end. It is the same with gmt begin.
PS. This continues my CostCo saga for metal prints of large maps: After receiving a flawed print and talking to CostCo support I learned that they have an undocumented "bleed" of 0.125" on all sides, hence if you wish to defeat their auto-cropping you must add the bleed up front, so that a 36x24 inch image at 300 dpi actually should be submitted as 10875x7275 pixels (with 75 pixels, nicely divisible by 2 (not) is cropped). Hence, I would like to add A+mbleed to my script but alas that fails.
The text was updated successfully, but these errors were encountered: