pscontour -E/-T transposed?

Added by Jim 3 months ago

Hi all,

In pscontour v4, -E specifies the azimuth/elevation, -T the network information. In the v5 documentation, these two options seem to have switched roles, but I find that I get (in v5.2) an azimuth-y error when using -E<network_file>:

-p[x|y|z]<azim>/<elev>[/<zlevel>][+w<lon0>/<lat0>[/<z0>][+v<x0>/<y0>]
Azimuth and elevation (and zlevel) of the viewpoint [180/90/bottom z-axis].
Append +w and +v to set coordinates to a fixed viewpoint

but a reasonable plot when using -T<network file>. Could it be that the implementation never caught up with the documentation change?


Replies (2)

RE: pscontour -E/-T transposed? - Added by Jim 3 months ago

Stranger and stranger. The above behaviour is on 5.2, so I tried also with 5.4.2 built from source. As previously -T<network> produces a correct plot, but now I get the warning

pscontour: Warning: Option -T<indexfile> is deprecated; use -E instead.

So I switch to -E<network>, and get the warning

pscontour: Warning: Option -E is deprecated. Use -p instead.

and the error

pscontour: Error in -p (network.csv): Syntax is -p[x|y|z]<azim>[/<elev>[/<zlevel>]][+w<lon0>/<lat0>[/<z0>][+v<x0>/<y0>]
pscontour: Syntax error -p option. Correct syntax:
    -p[x|y|z]<azim>[/<elev>[/<zlevel>]][+w<lon0>/<lat0>[/<z0>][+v<x0>/<y0>]
       Azimuth and elevation (and zlevel) of the viewpoint [180/90/bottom z-axis].
       Append +w and +v to set coordinates to a fixed viewpoint

For info, my entire pscontour command (for the case which actually produces postscript, -T<network>), is

gmt pscontour -R-180/180/0.01/0.35 -JP6.000000i -I -Tnetwork.csv -Cpalette.cpt spectrum.csv -K > plot.ps

RE: pscontour -E/-T transposed? - Added by Paul 3 months ago

hi Jim-

For a variety of reasons we settled on -p for the 3-D ax/elevation and related settings. It is a global option in GMT5. The other changes were driven partly to make pscontour and grdcontour have similar syntax. So the old -Tindexfile option became -E and -T has to do with closed contour embellishment. We check if the argument to -T is a file in which case we assume it is the old -Tindexfile option and we interpret it that way, plus -E is parsed as -p if backwards compatibility is turned on (which it is by default). However, we failed to consider that -E as is will be intercepted by the -p parser. I will see how I can fix that so -Eindexfile is not messed up.

(1-2/2)