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 src/MB/mbgetdata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function mbgetdata(cmd0::String=""; kwargs...)
d = init_module(false, kwargs...)[1] # Also checks if the user wants ONLY the HELP mode

cmd, opt_R = parse_R(d, "")
cmd, = parse_common_opts(d, cmd, [:UVXY :params], true)
cmd, = parse_common_opts(d, cmd, [:UVXY :params]; first=true)

cmd = parse_these_opts(cmd, d, [[:A :flagged], [:D :scaling], [:F :format],
[:S :speed], [:T :timegap], [:b :star_time], [:e :end_time]])
Expand Down
2 changes: 1 addition & 1 deletion src/MB/mbimport.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function mbimport(cmd0::String=""; kwargs...)

cmd, opt_R = parse_R(d, "")
cmd, opt_J = parse_J(d, cmd, " -JX12cd/0", true)
cmd, = parse_common_opts(d, cmd, [:UVXY :params :n :t], true)
cmd, = parse_common_opts(d, cmd, [:UVXY :params :n :t]; first=true)

cmd = parse_these_opts(cmd, d, [[:A :footprint], [:D :scaling], [:F :format], [:E :dpi], [:G :shade],
[:S :speed], [:T :timegap], [:b :star_time], [:e :end_time]])
Expand Down
4 changes: 2 additions & 2 deletions src/common_options.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,7 @@ function parse_helper(cmd::String, d::Dict, symbs::VMs, opt::String, sep='/')::T
end

# ---------------------------------------------------------------------------------------------------
function parse_common_opts(d::Dict, cmd::String, opts::VMs, first::Bool=true)
function parse_common_opts(d::Dict, cmd::String, opts::VMs; first::Bool=true, is3D::Bool=false)::Tuple{String, String}
(SHOW_KWARGS[1]) && return (print_kwarg_opts(opts, "(Common options)"),"") # Just print the options

ignore_J, ignore_R, ignore_p, ignore_t = false, false, false, false
Expand All @@ -1661,7 +1661,7 @@ function parse_common_opts(d::Dict, cmd::String, opts::VMs, first::Bool=true)
elseif (opt == :R && !ignore_R) cmd, o = parse_R(d, cmd)
elseif (opt == :I) cmd = parse_I(d, cmd, [:I :inc :increment :spacing], "I")
elseif (opt == :J && !ignore_J) cmd, o = parse_J(d, cmd)
elseif (opt == :JZ) cmd, o = parse_JZ(d, cmd)
elseif (opt == :JZ) cmd, o = parse_JZ(d, cmd; is3D=is3D, O=!first)
elseif (opt == :G) cmd, = parse_G(d, cmd)
elseif (opt == :F) cmd = parse_F(d, cmd)
elseif (opt == :UVXY) cmd = parse_UVXY(d, cmd)
Expand Down
2 changes: 1 addition & 1 deletion src/geodesy/psvelo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function velo(cmd0::String="", arg1=nothing; first=true, kwargs...)
d, K, O = init_module(first, kwargs...) # Also checks if the user wants ONLY the HELP mode

cmd, _, _, opt_R = parse_BJR(d, "", "", O, " -JX12cd/0d")
cmd, = parse_common_opts(d, cmd, [:UVXY :di :e :p :t :params], first)
cmd, = parse_common_opts(d, cmd, [:UVXY :di :e :p :t :params]; first=first)

if ((val = find_in_dict(d, [:A :arrow])[1]) !== nothing)
cmd = (isa(val, String)) ? cmd * " -A" * val : cmd * " -A" * vector_attrib(val)
Expand Down
2 changes: 1 addition & 1 deletion src/gmtbegin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ end
function inset(fim::StrSymb=""; stop=false, kwargs...)

d = KW(kwargs)
cmd, = parse_common_opts(d, "", [:c :F :V_params], true)
cmd, = parse_common_opts(d, "", [:c :F :V_params], first=true)
cmd = parse_these_opts(cmd, d, [[:M :margins], [:N :no_clip :noclip]])
cmd = parse_type_anchor(d, cmd, [:D :pos :position :inset :inset_box :insetbox],
(map=("g", arg2str, 1), outside=("J", arg2str, 1), inside=("j", arg2str, 1), norm=("n", arg2str, 1), paper=("x", arg2str, 1), anchor=("", arg2str, 2), width="+w", size="+w", justify="+j", offset=("+o", arg2str)), 'j')
Expand Down
2 changes: 1 addition & 1 deletion src/gmtlogo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function logo(cmd0::String=""; first=true, kwargs...)

cmd, = parse_R(d, "", O)
cmd, = parse_J(d, cmd, " -Jx1", true, O)
cmd, = parse_common_opts(d, cmd, [:UVXY :params], first)
cmd, = parse_common_opts(d, cmd, [:UVXY :params]; first=first)

cmd = parse_type_anchor(d, cmd, [:D :pos :position],
(map=("g", arg2str, 1), outside=("J", nothing, 1), inside=("j", nothing, 1), norm=("n", arg2str, 1), paper=("x", arg2str, 1), anchor=("", arg2str, 2), width="+w", size="+w", justify="+j", offset=("+o", arg2str)), 'g')
Expand Down
2 changes: 1 addition & 1 deletion src/grdcontour.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function grdcontour_helper(cmd0::String, arg1; first=true, kw...)
dict_auto_add!(d) # The ternary module may send options via another channel

cmd::String, opt_B, opt_J, opt_R = parse_BJR(d, "", "", O, " -JX" * split(DEF_FIG_SIZE, '/')[1] * "/0")
cmd, = parse_common_opts(d, cmd, [:UVXY :params :bo :c :e :f :h :p :t], first)
cmd, = parse_common_opts(d, cmd, [:UVXY :params :bo :c :e :f :h :p :t]; first=first)
cmd = parse_these_opts(cmd, d, [[:D :dump], [:F :force], [:L :range], [:Q :cut], [:S :smooth]])
cmd = parse_contour_AGTW(d::Dict, cmd::String)[1]
cmd = add_opt(d, cmd, "Z", [:Z :muladd :scale], (factor = "+s", shift = "+o", periodic = "_+p"))
Expand Down
2 changes: 1 addition & 1 deletion src/grdimage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function grdimage(cmd0::String="", arg1=nothing, arg2=nothing, arg3=nothing; fir
(!has_opt_B && isa(arg1, GMTimage) && (isimgsize(arg1) || CTRL.limits[1:4] == zeros(4)) && opt_B == DEF_FIG_AXES_BAK) &&
(cmd = replace(cmd, opt_B => "")) # Dont plot axes for plain images if that was not required

cmd, = parse_common_opts(d, cmd, [:UVXY :params :c :f :n :p :t], first)
cmd, = parse_common_opts(d, cmd, [:UVXY :params :c :f :n :p :t]; first=first)
cmd = parse_these_opts(cmd, d, [[:A :img_out :image_out], [:D :img_in :image_in], [:E :dpi], [:G :bit_color],
[:M :monochrome], [:N :noclip], [:Q :nan_alpha :alpha_color]])
cmd = add_opt(d, cmd, "%", [:layout :mem_layout], nothing)
Expand Down
2 changes: 1 addition & 1 deletion src/grdvector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function grdvector(arg1, arg2; first=true, kwargs...)
DEF_FIG_AXES_::String = (IamModern[1]) ? "" : DEF_FIG_AXES[1] # DEF_FIG_AXES is a global const
cmd, opt_B = parse_B(d, cmd, (O ? "" : DEF_FIG_AXES_))

cmd = parse_common_opts(d, cmd, [:UVXY :f :p :t :params], first)[1]
cmd = parse_common_opts(d, cmd, [:UVXY :f :p :t :params]; first=first)[1]
!(contains(cmd, "-V")) && (cmd *= " -Ve") # Shut up annoying warnings if -S has no units
cmd = parse_these_opts(cmd, d, [[:A :polar], [:N :noclip :no_clip], [:T :sign_scale], [:Z :azimuth]])
opt_S = add_opt(d, "", "S", [:S :vscale :vec_scale],
Expand Down
2 changes: 1 addition & 1 deletion src/grdview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function grdview_helper(cmd0::String, arg1; first=true, kwargs...)
(!have_opt_B && isa(arg1, GMTimage) && (isimgsize(arg1) || CTRL.limits[1:4] == zeros(4)) && opt_B == DEF_FIG_AXES_BAK) &&
(cmd = replace(cmd, opt_B => "")) # Dont plot axes for plain images if that was not required

cmd, = parse_common_opts(d, cmd, [:UVXY :c :f :n :p :t :params], first)
cmd, = parse_common_opts(d, cmd, [:UVXY :c :f :n :p :t :params]; first=first)
!first && !contains(cmd, " -p") && (cmd *= CURRENT_VIEW[1]) # Inherit current view
cmd = add_opt(d, cmd, "S", [:S :smooth])
if ((val = find_in_dict(d, [:N :plane])[1]) !== nothing)
Expand Down
2 changes: 1 addition & 1 deletion src/imshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function imshow(arg1::GItype; kw...)
new_see = see
see = false # because here we know that 'see' has to wait till last command
end
opt_p, = parse_common_opts(d, "", [:p :view :perspective], true)
opt_p, = parse_common_opts(d, "", [:p :view :perspective]; first=true)
have_tilles::Bool = ((til = find_in_dict(d, [:T :no_interp :tiles])[1]) !== nothing)
(!have_tilles && opt_p != "" && !contains(opt_p, '/')) && (flat = true) # If only 'azimuth' and no 'elev'
flat::Bool = (find_in_dict(d, [:flat])[1] !== nothing) # If true, force the use of grdimage
Expand Down
2 changes: 1 addition & 1 deletion src/psbasemap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function basemap(; first=true, kwargs...)

cmd, = parse_BJR(d, "", "", O, " -JX" * split(DEF_FIG_SIZE, '/')[1] * "/0")
cmd, = parse_JZ(d, cmd)
cmd, = parse_common_opts(d, cmd, [:F :UVXY :bo :c :f :p :t :params], first)
cmd, = parse_common_opts(d, cmd, [:F :UVXY :bo :c :f :p :t :params]; first=first)
cmd = parse_these_opts(cmd, d, [[:A :polygon]])
cmd = parse_Td(d, cmd)
cmd = parse_Tm(d, cmd)
Expand Down
2 changes: 1 addition & 1 deletion src/psclip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function clip_helper(cmd0::String, arg1; first=true, kwargs...)
d, K, O = init_module(first, kwargs...) # Also checks if the user wants ONLY the HELP mode

cmd, _, _, opt_R = parse_BJR(d, "", "", O, " -JX" * split(DEF_FIG_SIZE, '/')[1] * "/0")
cmd, = parse_common_opts(d, cmd, [:UVXY :JZ :c :e :f :g :p :t :yx :params], first)
cmd, = parse_common_opts(d, cmd, [:UVXY :JZ :c :e :f :g :p :t :yx :params]; first=first)
cmd = parse_these_opts(cmd, d, [[:A :steps :straightlines], [:C :endclip], [:N :invert], [:T :clipregion :clip_limits]])
cmd *= add_opt_pen(d, [:W :pen], "W")

Expand Down
2 changes: 1 addition & 1 deletion src/pscoast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function coast(cmd0::String=""; clip=nothing, first=true, kwargs...)
end
end
common = have_opt_M ? [:UVXY :bo :params] : [:F :JZ :UVXY :bo :c :p :t :params]
cmd, = parse_common_opts(d, cmd, common, !O) # If -M don't touch -p
cmd, = parse_common_opts(d, cmd, common; first=first) # If -M don't touch -p
cmd = parse_these_opts(cmd, d, [[:A :area], [:C :river_fill], [:D :res :resolution]])
cmd = parse_Td(d, cmd)
cmd = parse_Tm(d, cmd)
Expand Down
2 changes: 1 addition & 1 deletion src/pscontour.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function contour_helper(cmd0::String, arg1; first=true, kwargs...)
dict_auto_add!(d) # The ternary module may send options via another channel

cmd, _, _, opt_R = parse_BJR(d, "", "", O, " -JX" * split(DEF_FIG_SIZE, '/')[1] * "/0")
cmd, = parse_common_opts(d, cmd, [:UVXY :bo :c :d :do :e :p :t :params], first)
cmd, = parse_common_opts(d, cmd, [:UVXY :bo :c :d :do :e :p :t :params]; first=first)
cmd = parse_these_opts(cmd, d, [[:D :dump], [:I :fill :colorize], [:N :no_clip], [:Q :cut], [:S :skip]])
cmd *= add_opt_pen(d, [:L :mesh], "L")
cmd, opt_W = parse_contour_AGTW(d, cmd)
Expand Down
2 changes: 1 addition & 1 deletion src/pshistogram.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function histogram_helper(cmd0::String, arg1; first=true, kwargs...)

cmd, opt_B, opt_J, opt_R ::String= parse_BJR(d, cmd, "histogram", O, " -JX14c/14c")
cmd = parse_JZ(d, cmd)[1]
cmd = parse_common_opts(d, cmd, [:UVXY :JZ :c :e :f :p :t :w :params], first)[1]
cmd = parse_common_opts(d, cmd, [:UVXY :JZ :c :e :f :p :t :w :params]; first=first)[1]
cmd = parse_these_opts(cmd, d, [[:A :horizontal], [:F :center], [:Q :cumulative], [:S :stairs]])
nofill = ((symb = is_in_dict(d, [:G :fill])) !== nothing && d[symb] == "") ? true : false # To know if no fill was asked
cmd = add_opt_fill(cmd, d, [:G :fill], 'G')
Expand Down
2 changes: 1 addition & 1 deletion src/psimage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function image_helper(cmd0::String, arg1; first=true, kwargs...)
d, K, O = init_module(first, kwargs...) # Also checks if the user wants ONLY the HELP mode

cmd = parse_BJR(d, "", "", O, " -JX" * split(DEF_FIG_SIZE, '/')[1] * "/0")[1]
cmd = parse_common_opts(d, cmd, [:F :UVXY :JZ :c :p :t :params], first)[1]
cmd = parse_common_opts(d, cmd, [:F :UVXY :JZ :c :p :t :params]; first=first)[1]
cmd = parse_these_opts(cmd, d, [[:I :invert], [:M :monochrome]])
((val = find_in_dict(d, [:G :bitcolor :bit_color])[1]) !== nothing && isa(val, String)) && (cmd *= string(" -G", val))
((val = find_in_dict(d, [:bit_bg])[1]) !== nothing) && (cmd = add_opt_fill(val, cmd, " -G") * "+b")
Expand Down
2 changes: 1 addition & 1 deletion src/pslegend.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function legend(cmd0::String="", arg1=nothing; first::Bool=true, kwargs...)
# where the default is 8 pts. This allows for the user to set options 'fontsize' or 'font' to override the defaults.
((fnt = get_legend_font(d, IamModern[1] ? 0 : 8; modern=IamModern[1])) != "") && (cmd *= " --FONT_ANNOT_PRIMARY=" * fnt)

cmd, = parse_common_opts(d, cmd, [:F :c :p :q :t :JZ :UVXY :params], first)
cmd, = parse_common_opts(d, cmd, [:F :c :p :q :t :JZ :UVXY :params]; first=first)

opt_D = parse_type_anchor(d, "", [:D :pos :position],
(map=("g", arg2str, 1), outside=("J", arg2str, 1), inside=("j", arg2str, 1), norm=("n", arg2str, 1), paper=("x", arg2str, 1), anchor=("", arg2str, 2), width=("+w", arg2str), justify="+j", spacing="+l", offset=("+o", arg2str)), 'j')
Expand Down
2 changes: 1 addition & 1 deletion src/psmask.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function mask(cmd0::String="", arg1=nothing; first=true, kwargs...)
d, K, O = init_module(first, kwargs...) # Also checks if the user wants ONLY the HELP mode

cmd, _, _, opt_R = parse_BJR(d, "", "", O, " -JX12c/12c")
cmd, = parse_common_opts(d, cmd, [:I :UVXY :JZ :c :e :p :r :t :w :params], first)
cmd, = parse_common_opts(d, cmd, [:I :UVXY :JZ :c :e :p :r :t :w :params]; first=first)
cmd = parse_these_opts(cmd, d, [[:C :endclip :end_clip_path], [:D :dump], [:L :nodegrid], [:N :invert :inverse],
[:Q :cut :cut_number], [:S :search_radius], [:T :tiles]])

Expand Down
2 changes: 1 addition & 1 deletion src/psrose.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function rose_helper(cmd0::String, arg1; first=true, kwargs...)
end

cmd, opt_B, opt_J, opt_R = parse_BJR(d, "", "", O, " -JX12c")
cmd, = parse_common_opts(d, cmd, [:UVXY :c :e :p :t :w :params], first)
cmd, = parse_common_opts(d, cmd, [:UVXY :c :e :p :t :w :params]; first=first)
cmd = parse_these_opts(cmd, d, [[:D :shift], [:F :no_scale], [:L :labels], [:M :vector_params], [:N :vonmises],
[:Q :alpha], [:S :norm :normalize], [:T :orientation], [:Z :scale]])
cmd = add_opt(d, cmd, "A", [:A :sector :sectors], (width="", rose="_+r"))
Expand Down
2 changes: 1 addition & 1 deletion src/psscale.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function colorbar(arg1::Union{Nothing, GMTcpt}=nothing; first=true, kwargs...)

cmd = parse_BJR(d, "", "", O, "")[1]
cmd = parse_JZ(d, cmd)[1]
cmd = parse_common_opts(d, cmd, [:F :UVXY :params :c :p :t], first)[1]
cmd = parse_common_opts(d, cmd, [:F :UVXY :params :c :p :t]; first=first)[1]
cmd = parse_these_opts(cmd, d, [[:G :truncate], [:I :shade], [:M :monochrome], [:N :dpi],
[:Q :log], [:S :appearance :nolines], [:W :scale], [:Z :zfile]])
opt_D = parse_type_anchor(d, "", [:D :pos :position],
Expand Down
2 changes: 1 addition & 1 deletion src/pssolar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function solar(cmd0::String="", arg1=nothing; first=true, kwargs...)
def_J = (isempty(d)) ? " -JG0/0/14c" : " -JX14cd/0d"
(isempty(d)) && (d[:coast] = true; d[:T] = :d; d[:G] = "navy@75"; d[:show] = true)
cmd, opt_B, opt_J, opt_R = parse_BJR(d, "", "", O, def_J)
cmd, = parse_common_opts(d, cmd, [:bo :c :h :o :p :t :UVXY :params], first)
cmd, = parse_common_opts(d, cmd, [:bo :c :h :o :p :t :UVXY :params]; first=first)
cmd = parse_these_opts(cmd, d, [[:C :format], [:M :dump], [:N :invert]])

cmd = add_opt_fill(cmd, d, [:G :fill], 'G')
Expand Down
4 changes: 3 additions & 1 deletion src/pstext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,16 @@ function text(cmd0::String="", arg1=nothing; first=true, kwargs...)
end

cmd, opt_B, opt_J, opt_R = parse_BJR(d, "", "", O, " -JX" * split(DEF_FIG_SIZE, '/')[1] * "/0")
cmd, = parse_common_opts(d, cmd, [:a :e :f :p :t :w :JZ :UVXY :params], first)
_is3D = (isa(arg1, GDtype) && getsize(arg1)[2] == 3) # But this does not check the reading file path
cmd, = parse_common_opts(d, cmd, [:a :e :f :p :t :w :JZ :UVXY :params]; first=first, is3D=_is3D)
cmd = parse_these_opts(cmd, d, [[:A :azimuths :azimuth :azim], [:M :paragraph], [:N :no_clip :noclip],
[:Q :change_case], [:S :shade], [:T :text_box], [:Z :threeD]])
cmd = add_opt(d, cmd, "C", [:C :clearance], (margin="#", round="_+tO", concave="_+tc", convex="_+tC"))

# If file name sent in, read it and compute a tight -R if this was not provided
cmd, arg1, opt_R, = read_data(d, cmd0, cmd, arg1, opt_R)
contains(opt_R, "NaN") && error("Text element has no coordinates. So you cannot show it in the first command.")

(isa(arg1, AbstractString) || isa(arg1, Vector{<:AbstractString})) && (arg1 = parse_xy(d, arg1)) # See if x=.., y=..
if (isa(arg1, Array{<:Real}))
arg1 = [GMTdataset(arg1, Float64[], Float64[], DictSvS(), String[], String[], "", String[], "", "", 0, 0)]
Expand Down
2 changes: 1 addition & 1 deletion src/pswiggle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function wiggle_helper(cmd0::String, arg1; first=true, kw...)
d, K, O = init_module(first, kw...) # Also checks if the user wants ONLY the HELP mode

cmd, opt_B, opt_J, opt_R = parse_BJR(d, "", "", O, " -JX12c/0")
cmd, = parse_common_opts(d, cmd, [:c :e :f :g :p :t :w :F :UVXY :params], first)
cmd, = parse_common_opts(d, cmd, [:c :e :f :g :p :t :w :F :UVXY :params]; first=first)
cmd = parse_these_opts(cmd, d, [[:A :azimuth], [:C :center], [:I :fixed_azim], [:S], [:Z :ampscale :amp_scale]])

# If file name sent in, read it and compute a tight -R if this was not provided
Expand Down
2 changes: 1 addition & 1 deletion src/psxy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function common_plot_xyz(cmd0::String, arg1, caller::String, first::Bool, is3D::

axis_equal = is_axis_equal(d) # See if the user asked for an equal aspect ratio
cmd, opt_JZ = parse_JZ(d, cmd; O=O, is3D=is3D)
cmd, = parse_common_opts(d, cmd, [:a :e :f :g :t :w :params], first)
cmd, = parse_common_opts(d, cmd, [:a :e :f :g :t :w :params]; first=first)
cmd, opt_l = parse_l(d, cmd) # Parse this one (legend) aside so we can use it in classic mode
cmd, opt_f = parse_f(d, cmd) # Parse this one (-f) aside so we can check against D.attrib
cmd = parse_these_opts(cmd, d, [[:D :shift :offset], [:I :intens], [:N :no_clip :noclip]])
Expand Down
4 changes: 2 additions & 2 deletions src/seis/psmeca.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ function common_mecas(cmd0, arg1, d, proggy, first, K, O)

if (occursin("meca", proggy))
cmd, opt_B, opt_J, opt_R = parse_BJR(d, "", "", O, " -JX12cd/0d")
cmd, = parse_common_opts(d, cmd, [:UVXY :c :di :e :p :t :params], first)
cmd, = parse_common_opts(d, cmd, [:UVXY :c :di :e :p :t :params]; first=first)
(haskey(d, :A) || haskey(d, :offset) && GMTver <= v"6.4.0" && isa(arg1, GDtype)) &&
@warn("Due to a GMT bug (fixed in GMT > 6.4.0) plotting with offsets works only when data is in a disk file.")
cmd = parse_these_opts(cmd, d, [[:A :offset], [:D :depth_limits]])
else
cmd, opt_B, opt_J, opt_R = parse_BJR(d, "", "", O, " -JX14c/10c")
cmd, = parse_common_opts(d, cmd, [:UVXY :c :di :e :p :t :params], first)
cmd, = parse_common_opts(d, cmd, [:UVXY :c :di :e :p :t :params]; first=first)
cmd_ = add_opt(d, "", "Aa", [:Aa :cross_ll_pts], (lon1="", lat1="", lon2="", lat2="", dip="", width="", dmin="", dmax="", frame="_+f"))
if (cmd_ == "")
cmd_ = add_opt(d, "", "Ab", [:Ab :cross_ll_azim], (lon1="", lat1="", strike="", length="", dip="", width="", dmin="", dmax="", frame="_+f"))
Expand Down
2 changes: 1 addition & 1 deletion src/subplot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function subplot(fim=nothing; stop=false, kwargs...)
cmd = ((val = find_in_dict(d, [:T :title])[1]) !== nothing) ? " -T\"" * val * "\"" : ""
val_grid = find_in_dict(d, [:grid])[1] # Must fish this one right now because parse_B also looks for (another) :grid
cmd, = parse_BJR(d, cmd, "", false, " ")
cmd, = parse_common_opts(d, cmd, [:V_params], true)
cmd, = parse_common_opts(d, cmd, [:V_params], first=true)
cmd = parse_these_opts(cmd, d, [[:M :margin :margins]])
cmd = add_opt(d, cmd, "A", [:A :autolabel],
(Anchor=("+J", arg2str), anchor=("+j", arg2str), label="", clearance=("+c", arg2str), fill=("+g", add_opt_fill), pen=("+p", add_opt_pen), offset=("+o", arg2str), roman="_+r", Roman="_+R", vertical="_+v"))
Expand Down
2 changes: 1 addition & 1 deletion src/windbarbs/windbarbs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function windbarbs(arg1; first=true, kwargs...)
d, K, O = init_module(first, kwargs...) # Also checks if the user wants ONLY the HELP mode

cmd, opt_B, opt_J, opt_R = parse_BJR(d, "", "", O)
cmd = parse_common_opts(d, cmd, [:UVXY :a :bi :di :e :f :h :i :p :t :yx :params], first)[1]
cmd = parse_common_opts(d, cmd, [:UVXY :a :bi :di :e :f :h :i :p :t :yx :params]; first=first)[1]
cmd = parse_these_opts(cmd, d, [[:D :offset], [:I :intens], [:N :no_clip :noclip]])
cmd = add_opt(d, cmd, "Q", [:Q :barbs], (len=("", arg2str, 1), length=("", arg2str, 1), angle="+a", fill="+g", pen="+p", just="+j", speed="+s", width="+w", uv="+z", cartesian="+z"))
cmd *= opt_pen(d, 'W', [:W :pen])
Expand Down
Loading