-
Notifications
You must be signed in to change notification settings - Fork 385
Open
Labels
documentationImprove documentationImprove documentation
Description
As I understand it, -J
is an optional argument for all GMT modules. And from what I see in the following code, the default values are defined by these lines in src/gmt_inti.c
:
Lines 16127 to 16148 in 82a5564
if (got_J == false) { /* No history, apply default projection, but watch out for subplots and time-axis */ | |
unsigned int geo = gmtinit_is_region_geographic (GMT, *options, mod_name); | |
if (geo) /* Max dimension lon/lat plot of 15 cm */ | |
snprintf (scl, GMT_LEN64, "Q15c+du"); | |
else { /* Use 15cm square but watch out for panels and time-axes */ | |
char *Tcode[2] = {"", "T"}; | |
unsigned int xy[2]; | |
xy[GMT_X] = (gmt_get_column_type (GMT, GMT_IN, GMT_X) == GMT_IS_ABSTIME); | |
xy[GMT_Y] = (gmt_get_column_type (GMT, GMT_IN, GMT_Y) == GMT_IS_ABSTIME); | |
if (P && (P->dir[GMT_X] == -1 || P->dir[GMT_Y] == -1)) /* Nonstandard Cartesian axes directions */ | |
snprintf (scl, GMT_LEN64, "X%gi%s/%gi%s", P->dir[GMT_X]*P->w, Tcode[xy[GMT_X]], P->dir[GMT_Y]*P->h, Tcode[xy[GMT_Y]]); | |
else if (GMT->common.R.aspect == 1) /* Want the same scale in x and y and x should be 15 cm */ | |
snprintf (scl, GMT_LEN64, "X15c%s/0", Tcode[xy[GMT_X]]); | |
else if (GMT->common.R.aspect == -1) /* Want the same scale in x and y and y should be 15 cm */ | |
snprintf (scl, GMT_LEN64, "X0/15c%s", Tcode[xy[GMT_X]]); | |
else | |
snprintf (scl, GMT_LEN64, "X15c%s/15c%s", Tcode[xy[GMT_X]], Tcode[xy[GMT_Y]]); | |
} | |
if ((opt = GMT_Make_Option (API, 'J', scl)) == NULL) return NULL; /* Failure to make option */ | |
if ((*options = GMT_Append_Option (API, opt, *options)) == NULL) return NULL; /* Failure to append option */ | |
GMT_Report (API, GMT_MSG_DEBUG, "Modern: Adding -J%s to options since there is no history available.\n", scl); | |
} |
However, I cannot find this mentioned in the documentation anywhere. Is this the case? Or is there any good reason not to do it?
I offer to document it if needed.
This is related #8694.
Metadata
Metadata
Assignees
Labels
documentationImprove documentationImprove documentation