Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Linux
os: ubuntu-latest
- name: macOS
os: macos-latest
os: macos-15-intel
- name: Windows
os: windows-latest
- name: Linux (without optional dependencies)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Linux
os: ubuntu-latest
- name: macOS
os: macos-13 # macos-14 use M1 chips, which causes many failures
os: macos-15-intel # macos-14 use M1 chips, which causes many failures
- name: Windows
os: windows-latest

Expand Down
18 changes: 10 additions & 8 deletions doc/rst/source/grdview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Synopsis
[ |-I|\ [*file*\|\ *intens*\|\ **+a**\ *azimuth*][**+d**][**+m**\ *ambient*][**+n**\ *args*] ]
[ |-Jz|\ \|\ **Z**\ *parameters* ]
[ |-N|\ [*level*]\ [**+g**\ *fill*] ]
[ |-Q|\ **c**\|\ **i**\|\ **m**\ [**x**\|\ **y**]\|\ **s**\ [**m**]\|\ **g**\ [**m**]\ [*color*][**+m**] ]
[ |-Q|\ **c**\|\ **g**\ [**m**]\ **i**\|\ **m**\ [**x**\|\ **y**]\|\ **s**\ [**m**]\|\ [*color*][**+m**]\ **t** ]
[ |SYN_OPT-Rz| ]
[ |-S|\ *smooth* ]
[ |-T|\ [**+o**\ [*pen*]][**+s**] ]
Expand Down Expand Up @@ -101,24 +101,26 @@ Optional Arguments

.. _-Q:

**-Q**\ **c**|\ **g**[**m**][**a**]|\ **i**|\ **m**\ [**x**|\ **y**]|\ **s**\ [**m**]\ [*color*][**+m**]
**-Q**\ **c**\|\ **g**\ [**m**]\ **i**\|\ **m**\ [**x**\|\ **y**]\|\ **s**\ [**m**]\|\ [*color*][**+m**]\ **t**
Select one of following directives. For any of these choices:

- **c** - Image plot, but will make nodes with *z* = NaN transparent, using the color-masking
feature in PostScript Level 3. Optionally append the effective dots-per-unit resolution
for the rasterization [Default is :term:`GMT_GRAPHICS_DPU`].
- **i** - Image plot. Optionally append the effective dots-per-unit resolution for the
rasterization [Default is :term:`GMT_GRAPHICS_DPU`].
- **m** - Mesh plot [Default]. Optionally append *color* for a different mesh paint [white].
For waterfall plots, append **x** for row or **y** for column profiles. Specify color as for plain **m**.
- **s** - Surface plot. Optionally append **m** to have mesh lines drawn on top of surface. See **-Wm** for
setting a specific mesh *pen*.
- **g** - Gouraud-shaded surface with smooth vertex-based color gradients. Optionally append **m** to draw mesh lines
on top of the surface. Append **a** to use alternate diagonal when splitting tiles into triangles.
Gouraud shading produces smoother color transitions than **-Qs** and generates significantly smaller
and faster PostScript files. The **-Qs** option should be used though when precise color transitions
are required at contour levels (to do a `contourf` type figure. See **-Wc**) because the Gouraud-shaded
doesn't cut the tiles along the contour lines as **-Qs** does.
- **i** - Image plot. Optionally append the effective dots-per-unit resolution for the
rasterization [Default is :term:`GMT_GRAPHICS_DPU`].
- **m** - Mesh plot [Default]. Optionally append *color* for a different mesh paint [white].
For waterfall plots, append **x** for row or **y** for column profiles. Specify color as for plain **m**.
- **s** - Surface plot. Optionally append **m** to have mesh lines drawn on top of surface. See **-Wm** for
setting a specific mesh *pen*.
- **t** - Paint tiles without color interpolation. Good for categorical data. Optionally append the effective
dots-per-unit resolution for the rasterization [Default is :term:`GMT_GRAPHICS_DPU`].

A modifier can adjust the color further:

Expand Down
14 changes: 7 additions & 7 deletions src/grdview.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ static int usage (struct GMTAPI_CTRL *API, int level) {
const char *name = gmt_show_name_and_purpose (API, THIS_MODULE_LIB, THIS_MODULE_CLASSIC_NAME, THIS_MODULE_PURPOSE);
if (level == GMT_MODULE_PURPOSE) return (GMT_NOERROR);
GMT_Usage (API, 0, "usage: %s <topogrid> %s [%s] [-C%s] [-G<drapegrid>|<drapeimage>] "
"[-I[<intensgrid>|<value>|<modifiers>]] [%s] %s[-N[<level>][+g<fill>]] %s%s[-Qc|i|m[x|y]|s[<color>][+m]] [%s] [-S<smooth>] "
"[-I[<intensgrid>|<value>|<modifiers>]] [%s] %s[-N[<level>][+g<fill>]] %s%s[-Qc|g[m|a]|i|m[x|y]|s[<color>][+m]] [%s] [-S<smooth>] "
"[-T[+o[<pen>]][+s]] [%s] [%s] [-W<type><pen>] [%s] [%s] %s[%s] [%s] [%s] [%s] [%s]\n",
name, GMT_J_OPT, GMT_B_OPT, CPT_OPT_ARGS, GMT_Jz_OPT, API->K_OPT, API->O_OPT, API->P_OPT, GMT_Rgeoz_OPT, GMT_U_OPT, GMT_V_OPT,
GMT_X_OPT, GMT_Y_OPT, API->c_OPT, GMT_f_OPT, GMT_n_OPT, GMT_p_OPT, GMT_t_OPT, GMT_PAR_OPT);
Expand Down Expand Up @@ -542,13 +542,14 @@ static int usage (struct GMTAPI_CTRL *API, int level) {
GMT_Usage (API, 3, "c: Transform polygons to raster-image via scanline conversion. Append effective <dpu> [%lg%c]. "
"Set PS Level 3 color-masking for nodes with z = NaN.",
API->GMT->current.setting.graphics_dpu, API->GMT->current.setting.graphics_dpu_unit);
GMT_Usage (API, 3, "g: Gouraud-shaded surface with smooth vertex-based color gradients. Append m to draw mesh-lines. Append a for alternate diagonal algorithm.");
GMT_Usage (API, 3, "i: As c but no color-masking. Append effective <dpu> [%lg%c].",
API->GMT->current.setting.graphics_dpu, API->GMT->current.setting.graphics_dpu_unit);
GMT_Usage (API, 3, "m: Mesh plot [Default]. Append <color> for mesh paint [%s]. "
"Alternatively, append x or y for row or column \"waterfall\" profiles.",
gmt_putcolor (API->GMT, API->GMT->PSL->init.page_rgb));
GMT_Usage (API, 3, "s: Colored or shaded surface. Optionally, append m to draw mesh-lines on the surface.");
GMT_Usage (API, 3, "g: Gouraud-shaded surface with smooth vertex-based color gradients. Append m to draw mesh-lines. Append a for alternate diagonal.");
GMT_Usage (API, 3, "t: Paint tiles without color interpolation. Good for categorical data.");
GMT_Usage (API, -2, "Color may be further adjusted by a modifier:");
GMT_Usage (API, 3, "+m Force a monochrome image using the YIQ transformation.");
GMT_Option (API, "R");
Expand Down Expand Up @@ -733,20 +734,19 @@ static int parse (struct GMT_CTRL *GMT, struct GRDVIEW_CTRL *Ctrl, struct GMT_OP
Ctrl->Q.cpt = true; /* Will need a CPT */
Ctrl->Q.mask = true;
break;
case 't': /* Image without color interpolation */
Ctrl->Q.special = true;
Ctrl->Q.cpt = true; /* Will need a CPT */
/* Intentionally fall through - to 'i' */
case 'g': /* Gouraud-shaded surface */
Ctrl->Q.mode = GRDVIEW_SURF;
Ctrl->Q.gouraud = true;
Ctrl->Q.cpt = true; /* Will need a CPT */
if (opt->arg[1] == 'm') Ctrl->Q.outline = 1;
if (opt->arg[1] == 'a') Ctrl->Q.diagonal = 1;
break;
case 't': /* Image without color interpolation */
Ctrl->Q.special = true;
/* Intentionally fall through - to 'i' */
case 'i': /* Image with clipmask */
Ctrl->Q.mode = GRDVIEW_IMAGE;
if (opt->arg[1] && isdigit ((int)opt->arg[1])) Ctrl->Q.dpi = grdview_get_dpi (&opt->arg[1]);
if (opt->arg[1] && isdigit((int)opt->arg[1])) Ctrl->Q.dpi = grdview_get_dpi(&opt->arg[1]);
Ctrl->Q.cpt = true; /* Will need a CPT */
break;
case 'm': /* Mesh plot */
Expand Down
Loading