From 8b1fe5baca84e1e3d95969a8ab5446a82f3cfba0 Mon Sep 17 00:00:00 2001 From: Paul Wessel Date: Wed, 15 Nov 2023 17:07:04 +0100 Subject: [PATCH] Only give annoying -p message if elevation is not 90 We dont need to get image [WARNING]: The -p option works best in consort with -J (and -R or a grid) for simple rotations about z. This PR restricts that message to el < 90. --- src/gmt_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gmt_init.c b/src/gmt_init.c index 4b8b65328df..aa0e5a2b721 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -2817,8 +2817,6 @@ GMT_LOCAL int gmtinit_parse_p_option (struct GMT_CTRL *GMT, char *item) { if (!GMT->common.J.active) { gmt_set_missing_options (GMT, "J"); /* If mode is modern and -J exist in the history, and if an overlay we may add these from history automatically */ - if (!GMT->common.J.active) - GMT_Report (GMT->parent, GMT_MSG_WARNING, "The -p option works best in consort with -J (and -R or a grid)\n"); } switch (item[0]) { case 'x': GMT->current.proj.z_project.view_plane = GMT_X + GMT_ZW; l++; break; @@ -2874,6 +2872,8 @@ GMT_LOCAL int gmtinit_parse_p_option (struct GMT_CTRL *GMT, char *item) { else GMT->common.p.z_rotation = az; + if (!GMT->common.J.active && el < 90.0) + GMT_Report (GMT->parent, GMT_MSG_WARNING, "The -p option works best in consort with -J (and -R or a grid)\n"); return (error); }