Skip to content

Commit badb657

Browse files
PaulWesselgithub-actions[bot]
authored andcommitted
Subplot auto-height needs -R -J (#4089)
* Require -R -J if -Fs gives zero height We then need to compute the height, which requires -R -J * Update subplot.c
1 parent c4495d3 commit badb657

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/subplot.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ static int parse (struct GMT_CTRL *GMT, struct SUBPLOT_CTRL *Ctrl, struct GMT_OP
615615
/* Was both -R -J given? */
616616
n_errors += gmt_M_check_condition (GMT, GMT->common.J.active && !GMT->common.R.active[RSET], "Option -J: Requires -R as well!\n");
617617
n_errors += gmt_M_check_condition (GMT, GMT->common.J.active && Ctrl->F.mode == SUBPLOT_FIGURE, "Option -J: Requires -Fs to determine subplot height!\n");
618+
n_errors += gmt_M_check_condition (GMT, Ctrl->F.reset_h && !GMT->common.J.active && !GMT->common.R.active[RSET], "Option -Fs: Requires -R -J to determine subplot height if specified as zero!\n");
618619
if (GMT->common.J.active) { /* Compute map height from -R -J */
619620
if (gmt_M_err_pass (GMT, gmt_map_setup (GMT, GMT->common.R.wesn), "")) n_errors++;
620621
for (j = 0; j < Ctrl->N.dim[GMT_Y]; j++) Ctrl->F.h[j] = GMT->current.map.height;

0 commit comments

Comments
 (0)