Skip to content

Commit daca0ba

Browse files
authored
Move the CTRLstruct.pocket_call out to a separate global. (#1843)
1 parent e7e4bc2 commit daca0ba

16 files changed

Lines changed: 110 additions & 97 deletions

src/GMT.jl

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,32 @@ struct CTRLstruct
1212
figsize::Vector{Float64} # To store the current fig size (xsize,ysize[,zsize]). Needed, for example, in hexbin
1313
proj_linear::Vector{Bool} # To know if images sent to GMT need Pad
1414
returnPS::Vector{Bool} # To know if returning the PS to Julia
15-
callable::Array{Symbol} # Modules that can be called inside other modules
16-
pocket_call::Vector{Any} # To temporarily store data needed by modules sub-calls. Put in [3] for pre-calls
15+
callable::Vector{Symbol} # Modules that can be called inside other modules
1716
pocket_B::Vector{String} # To temporarily store opt_B grid and fill color to be reworked in psclip
1817
pocket_J::Vector{String} # To temporarily store opt_J and fig size to eventualy flip directions (y + down, etc)
1918
# = [opt_J width opt_Jz codes-to-tell-which-axis-to-reverse]
2019
pocket_R::Vector{String} # To temporarily store opt_R
2120
XYlabels::Vector{String} # To temporarily store the x,y col names to let x|y labels know what to plot (if "auto")
2221
IamInPaperMode::Vector{Bool} # A 2 elem vec to know if we are in under-the-hood paper mode. 2nd traces if first call
2322
gmt_mem_bag::Vector{Ptr{Cvoid}} # To temporarily store a GMT owned memory to be freed in gmt()
24-
pocket_d::Vector{Dict} # To pass the Dict of kwargs, after consumption, to other modules.
23+
pocket_d::Vector{Dict{Symbol,Any}} # To pass the Dict of kwargs, after consumption, to other modules.
2524
end
2625

27-
struct CTRLstruct2
28-
first::Vector{Bool} # Signal that we are starting a new plot (used to set params)
29-
points::Vector{Bool} # If maps are using points as coordinates
30-
fname::Vector{String} # Store the full name of PS being constructed
26+
mutable struct CTRLstruct2
27+
first::Bool # Signal that we are starting a new plot (used to set params)
28+
points::Bool # If maps are using points as coordinates
29+
fname::String # Store the full name of PS being constructed
30+
end
31+
32+
mutable struct TMPDIRInfo
33+
dir::String # Temporary directory path
34+
username::String # Username (spaces replaced with underscores)
35+
pid_suffix::String # PID suffix for multi-process support
36+
end
37+
38+
mutable struct InsetInfo
39+
active::Bool # Whether currently in inset mode
40+
has_J::Bool # Whether -J projection option was provided (GMT bug #7005 workaround)
3141
end
3242

3343
depfile = joinpath(dirname(@__FILE__),"..","deps","deps.jl") # File with shared lib names
@@ -55,7 +65,7 @@ end
5565

5666
const G_API = Ref{Ptr{Cvoid}}(C_NULL)
5767
const PSname = Ref{String}("") # The PS file (filled in __init__) where, in classic mode, all lands.
58-
const global TMPDIR_USR = [tempdir(), "", ""] # Save the tmp dir and user name (also filled in __init__)
68+
const TMPDIR_USR = TMPDIRInfo(tempdir(), "", "") # Save the tmp dir and user name (also filled in __init__)
5969
const global TESTSDIR = joinpath(dirname(pathof(GMT))[1:end-4], "test", "") # To have easy access to test files
6070
const IMG_MEM_LAYOUT = Ref{String}("") # "TCP" For Images.jl. The default is "TRBa"
6171
const GRD_MEM_LAYOUT = Ref{String}("") # "BRP" is the default for GMT PS images.
@@ -66,7 +76,7 @@ const FirstModern = Ref{Bool}(false) # To know
6676
const DidOneGmtCmd = Ref{Bool}(false) # To know when first gmt() call. Used in first modern mode cmd to not restart what is still fresh
6777
const IamModernBySubplot = Ref{Bool}(false) # To know if set in subpot
6878
const IamSubplot = Ref{Bool}(false) # To know if we are in subplot mode
69-
const global IamInset = [false, false] # To know if we are in Inset mode
79+
const IamInset = InsetInfo(false, false) # To know if we are in Inset mode
7080
const usedConfPar = Ref{Bool}(false) # Hacky solution for the session's memory trouble
7181
const ThemeIsOn = Ref{Bool}(false) # To know if we have an active plot theme
7282
const CONVERT_SYNTAX = Ref{Bool}(false) # To only convert to hard core GMT syntax (like Vd=2)
@@ -87,8 +97,9 @@ const DEF_FIG_AXES = Ref{String}(DEF_FIG_AXES_BAK) # This one may be be chan
8797
const DEF_FIG_AXES3 = Ref{String}(DEF_FIG_AXES3_BAK) # ""
8898
const FIG_MARGIN = Ref{Int}(1) # Figure margin in points after convertion by 'psconvert'. Accessible 'margin' common option
8999
const global CTRL = CTRLstruct(zeros(13), zeros(6), [true], [false],
90-
[:arrows, :bubblechart, :basemap, :band, :clip, :coast, :colorbar, :grdcontour, :hband, :hlines, :inset, :logo, :lines, :grdvector, :plot, :plot3, :quiver, :scatter, :scatter3, :stairs, :text, :vlines, :vband], fill(nothing, 6), ["","",""], ["","", "", " "], ["",""], ["",""], [false,true], [C_NULL], [Dict()])
91-
const global CTRLshapes = CTRLstruct2([true], [true], [""]) # Used in sub-module Drawing
100+
[:arrows, :bubblechart, :basemap, :band, :clip, :coast, :colorbar, :grdcontour, :hband, :hlines, :inset, :logo, :lines, :grdvector, :plot, :plot3, :quiver, :scatter, :scatter3, :stairs, :text, :vlines, :vband], ["","",""], ["","", "", " "], ["",""], ["",""], [false,true], [C_NULL], [Dict()])
101+
const pocket_call = Ref{Vector{Any}}(Any[nothing, nothing, nothing, nothing, nothing, nothing]) # Extracted from CTRL to isolate type instability
102+
const CTRLshapes = CTRLstruct2(true, true, "") # Used in sub-module Drawing
92103
const prj4WGS84 = "+proj=longlat +datum=WGS84 +units=m +no_defs" # This is used in many places
93104
const global CPTaliases = [:C :color :cmap :colormap :colorscale]
94105
const global VMs = Union{Vector{Symbol}, Matrix{Symbol}}
@@ -467,9 +478,9 @@ function __init__(test::Bool=false)
467478
f = joinpath(GMTuserdir[1], "theme_jl.txt")
468479
(isfile(f)) && (theme(readline(f)); ThemeIsOn[] = false) # False because we don't want it reset in showfig()
469480
user = (Sys.isunix() || Sys.isapple()) ? Libc.getpwuid(Libc.getuid(), true).username : Sys.iswindows() ? ENV["USERNAME"] : ""
470-
TMPDIR_USR[2] = replace(user, " " => "_")
471-
haskey(ENV, "JULIA_GMT_MULTIFILE") && (TMPDIR_USR[3] = string("_", getpid()))
472-
PSname[] = TMPDIR_USR[1] * "/" * "GMTjl_" * TMPDIR_USR[2] * TMPDIR_USR[3] * ".ps"
481+
TMPDIR_USR.username = replace(user, " " => "_")
482+
haskey(ENV, "JULIA_GMT_MULTIFILE") && (TMPDIR_USR.pid_suffix = string("_", getpid()))
483+
PSname[] = TMPDIR_USR.dir * "/" * "GMTjl_" * TMPDIR_USR.username * TMPDIR_USR.pid_suffix * ".ps"
473484
DidOneGmtCmd[] = false
474485
end
475486

src/common_options.jl

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function parse_R(d::Dict, cmd::String; O::Bool=false, del::Bool=true, RIr::Bool=
192192
end
193193

194194
(O && opt_R == "") && (opt_R = " -R")
195-
if (!already_know && opt_R != "" && opt_R != " -R" && !IamInset[1] && !noGlobalR) # Save limits in numeric
195+
if (!already_know && opt_R != "" && opt_R != " -R" && !IamInset.active && !noGlobalR) # Save limits in numeric
196196
bak = IamModern[]
197197
try
198198
limits = opt_R2num(opt_R)
@@ -489,7 +489,7 @@ function parse_J(d::Dict, cmd::String; default::String="", map::Bool=true, O::Bo
489489
opt_J, mnemo = build_opt_J(val) # mnemo = true when the projection name used a mnemonic for the projection
490490
elseif (IamModern[] && ((val = is_in_dict(d, [:figscale :fig_scale :scale :figsize :fig_size])) === nothing))
491491
# Subplots do not rely in the classic default mechanism
492-
(IamInset[1] && !IamInset[2] && !contains(cmd, " -J")) && (cmd *= CTRL.pocket_J[1]::String) # Workaround GMT bug (#7005)
492+
(IamInset.active && !IamInset.has_J && !contains(cmd, " -J")) && (cmd *= CTRL.pocket_J[1]::String) # Workaround GMT bug (#7005)
493493
return cmd, ""
494494
end
495495
if (CTRL.proj_linear[1]) # Otherwise (CTRL.proj_linear[1] == false), trust it
@@ -2835,16 +2835,16 @@ end
28352835
Put VAL in the next empty slot in the pocket_call vector. So far only 2 slots
28362836
"""
28372837
function put_pocket_call(val)
2838-
(CTRL.pocket_call[1] === nothing) ? (CTRL.pocket_call[1] = val) : (CTRL.pocket_call[2] = val)
2838+
(pocket_call[][1] === nothing) ? (pocket_call[][1] = val) : (pocket_call[][2] = val)
28392839
end
28402840
"""
28412841
val get_pocket_call() -> Any
28422842
28432843
Pop the contents of the first non-empty slot in the pocket_call vector stack
28442844
"""
28452845
function get_pocket_call()
2846-
val = CTRL.pocket_call[1] # Should error if val is nothing or are there concievable correct cases?
2847-
CTRL.pocket_call[1] = CTRL.pocket_call[2]; CTRL.pocket_call[2] = nothing
2846+
val = pocket_call[][1] # Should error if val is nothing or are there concievable correct cases?
2847+
pocket_call[][1] = pocket_call[][2]; pocket_call[][2] = nothing
28482848
return val
28492849
end
28502850

@@ -3235,9 +3235,9 @@ function helper3_axes(arg, primo::String, axe::String)::String
32353235
@warn("Argument of the custom annotations must be an N-array or a NamedTuple"); return ""
32363236
end
32373237

3238-
temp::String = "GMTjl_custom_" * primo * "_" * TMPDIR_USR[2] * TMPDIR_USR[3]
3238+
temp::String = "GMTjl_custom_" * primo * "_" * TMPDIR_USR.username * TMPDIR_USR.pid_suffix
32393239
(axe != "") && (temp *= axe)
3240-
fname = joinpath(TMPDIR_USR[1], temp * ".txt")
3240+
fname = joinpath(TMPDIR_USR.dir, temp * ".txt")
32413241
fid = open(fname, "w")
32423242
if (label != [""])
32433243
for k = 1:n_annot
@@ -4111,7 +4111,7 @@ function dbg_print_cmd(d::Dict, cmd::Vector{String})
41114111

41124112
if (Vd >= 2) # Delete these first before reporting
41134113
delete!(d, [[:show], [:leg, :legend, :l], [:box_pos], [:leg_pos], [:figname], [:name], [:savefig]])
4114-
CTRL.pocket_call[3] = nothing # This is mostly for testing purposes, but potentially needed elsewhere.
4114+
pocket_call[][3] = nothing # This is mostly for testing purposes, but potentially needed elsewhere.
41154115
CTRL.limits[1:12] = zeros(12)
41164116
# Some times an automtic CPT has been generated by the Vd'ed cmd but when that happens MUST debug it
41174117
#CURRENT_CPT[] = GMTcpt() # Can't do this because it would f. plot(..., colorbar=true)
@@ -4182,12 +4182,12 @@ function showfig(d::Dict{Symbol, Any}, fname_ps::String, fname_ext::String, opt_
41824182
if (fname_ps != "" && isPluto) # A patch attempt to an undebugable Pluto thing
41834183
(K) && close_PS_file(fname_ps) # Close the PS file first
41844184
gmt(pscvt_cmd * fname_ps * " -Tg *")
4185-
out = TMPDIR_USR[1] * "/" * "GMTjl_" * TMPDIR_USR[2] * TMPDIR_USR[3] * ".png"
4185+
out = TMPDIR_USR.dir * "/" * "GMTjl_" * TMPDIR_USR.username * TMPDIR_USR.pid_suffix * ".png"
41864186
opt_T, fname_ps = "", ""
41874187
end
41884188

41894189
# When we are in Jupyter or Pluto, the image may already be in a raster format by a previous call to 'gmt end'
4190-
(isJupyter[] || isPluto) && (fname_ps = TMPDIR_USR[1] * "/" * "GMTjl_" * TMPDIR_USR[2] * TMPDIR_USR[3] * "." * FMT[]; opt_T = "")
4190+
(isJupyter[] || isPluto) && (fname_ps = TMPDIR_USR.dir * "/" * "GMTjl_" * TMPDIR_USR.username * TMPDIR_USR.pid_suffix * "." * FMT[]; opt_T = "")
41914191

41924192
if (opt_T != "")
41934193
(K) && close_PS_file(fname_ps) # Close the PS file first
@@ -4215,7 +4215,7 @@ function showfig(d::Dict{Symbol, Any}, fname_ps::String, fname_ext::String, opt_
42154215
end
42164216
CTRL.limits .= 0.0; CTRL.figsize .= 0.0; CTRL.proj_linear[1] = true; # Reset these for safety
42174217
CTRL.pocket_J[1], CTRL.pocket_J[2], CTRL.pocket_J[3], CTRL.pocket_J[4] = "", "", "", " ";
4218-
CTRL.pocket_R[1:2] .= ""; isJupyter[] = false; CTRL.pocket_call .= nothing
4218+
CTRL.pocket_R[1:2] .= ""; isJupyter[] = false; pocket_call[] .= nothing
42194219
CURRENT_VIEW[] = ""
42204220
return retPluto ? WrapperPluto(out) : nothing # retPluto should make it all way down to base so that Plut displays it
42214221
end
@@ -4453,9 +4453,9 @@ function finish_PS_module(d::Dict, cmd::Vector{String}, opt_extra::String, K::Bo
44534453

44544454
orig_J::String = "" # To use in the case of a double Cartesian/Geog frame.
44554455
fi = 1
4456-
if (CTRL.pocket_call[3] !== nothing) # Case where we want to run a "pre command" whose data is in pocket_call[3]
4457-
P = (isa(CTRL.pocket_call[3], String)) ? gmt(cmd[1]) : gmt(cmd[1], CTRL.pocket_call[3])
4458-
CTRL.pocket_call[3] = nothing # Reset
4456+
if (pocket_call[][3] !== nothing) # Case where we want to run a "pre command" whose data is in pocket_call[3]
4457+
P = (isa(pocket_call[][3], String)) ? gmt(cmd[1]) : gmt(cmd[1], pocket_call[][3])
4458+
pocket_call[][3] = nothing # Reset
44594459
fi = 2 # First index, the one that the args... respect, start at 2
44604460
end
44614461

@@ -4482,23 +4482,23 @@ function finish_PS_module(d::Dict, cmd::Vector{String}, opt_extra::String, K::Bo
44824482
continue
44834483
elseif (k >= 1+fi && !first_was_psclip && (is_pscoast || is_basemap || is_plot) && (args1_is_I || args1_is_G || args1_is_D))
44844484
orig_J, orig_R = finish_PS_module_barr_2(d, args[1], cmd, k, is_plot, orig_J)
4485-
elseif (k >= 1+fi && k2_no_pocket && !is_psscale && !is_pscoast && !is_basemap && !is_text && (CTRL.pocket_call[1] !== nothing))
4485+
elseif (k >= 1+fi && k2_no_pocket && !is_psscale && !is_pscoast && !is_basemap && !is_text && (pocket_call[][1] !== nothing))
44864486
# For nested calls that need to pass data
44874487
P = gmt(cmd[k], get_pocket_call())
44884488
continue
44894489
elseif (startswith(cmd[k], "psclip") || is_text) # Pure (unique) psclip requires args. Compose cmd not
4490-
P = (CTRL.pocket_call[1] !== nothing) ? gmt(cmd[k], get_pocket_call()) :
4490+
P = (pocket_call[][1] !== nothing) ? gmt(cmd[k], get_pocket_call()) :
44914491
(length(cmd) > 1) ? gmt(cmd[k]) : gmt(cmd[k], args...)
44924492
continue
44934493
elseif (startswith(cmd[k], "inset")) # Here we have an already made inset ps file waiting to be included
4494-
finset = searchdir(TMPDIR_USR[1], "GMTjl__inset__")[1] # Even if there are more we only want the first
4495-
add2PSfile(TMPDIR_USR[1] * "/" * finset, isfile=true) # Add the partial inset ps in main ps file.
4496-
rm(TMPDIR_USR[1] * "/" * finset) # Crutial to delete after use to not be picked in a eventual next round
4494+
finset = searchdir(TMPDIR_USR.dir, "GMTjl__inset__")[1] # Even if there are more we only want the first
4495+
add2PSfile(TMPDIR_USR.dir * "/" * finset, isfile=true) # Add the partial inset ps in main ps file.
4496+
rm(TMPDIR_USR.dir * "/" * finset) # Crutial to delete after use to not be picked in a eventual next round
44974497
continue
44984498
end
44994499
(k == 2) && (k2_no_pocket = true) # For other k's this has to be neutral.
45004500
# Allow also plot data from a nested call to plot
4501-
cond = !(k > fi && is_plot && (CTRL.pocket_call[1] !== nothing))
4501+
cond = !(k > fi && is_plot && (pocket_call[][1] !== nothing))
45024502
# Next line means cases like 'plot(D, marker=:circ, ms="4p", lt=0.5, plot=(data=...))' where data in 'D'
45034503
# must be used twice before we pass to the next 'plot' (a nested call).
45044504
!cond && is_plot && (k == fi + 1) && (k < n_cmds) && contains(cmd[k], " -S") && (cond = true)
@@ -4510,7 +4510,7 @@ function finish_PS_module(d::Dict, cmd::Vector{String}, opt_extra::String, K::Bo
45104510
IamModern[] && (orig_J = "") # setting orig_J to "" is a way of avoiding next line that is not for modern mode.
45114511
(orig_J != "") && (gmt("psxy -T -J" * orig_J * " -R" * orig_R * " -O -K" * apenda * output); orig_J = "")
45124512
end
4513-
CTRL.pocket_call[1] = nothing; CTRL.pocket_call[2] = nothing # For the case it was not yet empty
4513+
pocket_call[][1] = nothing; pocket_call[][2] = nothing # For the case it was not yet empty
45144514

45154515
finish_PS_module_barr_last(d, cmd, fname, fname_ext, opt_extra, output, opt_T, K, P) # returns P
45164516
end

src/drawing/Drawing.jl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ function helper_shapes(x, y, cmd; Vd=0, kw...)
8080
# Se if we are asked to force the start a new drawing (first= true) or bypass the CTRLshapes.first control
8181
_first = find_in_dict(d, [:first])[1]
8282
first = (_first !== nothing) && (_first == 1)
83-
CTRLshapes.first[1] = first
83+
CTRLshapes.first = first
8484

85-
if (CTRLshapes.first[1])
86-
CTRLshapes.fname[1] = PSname[]
85+
if (CTRLshapes.first)
86+
CTRLshapes.fname = PSname[]
8787
if ((val = find_in_dict(d, [:units])[1]) !== nothing)
8888
_cmd, opt_B = parse_B(d, "", DEF_FIG_AXES[])
8989
cmd *= " --PROJ_LENGTH_UNIT=p"
@@ -95,7 +95,7 @@ function helper_shapes(x, y, cmd; Vd=0, kw...)
9595
else
9696
opt_R, ps_media = " -R0/594/0/841", " --PS_MEDIA=1194x1441" # add 600 pt to PS_MEDIA to account 4 the 20 cm
9797
end
98-
CTRLshapes.points[1] = true
98+
CTRLshapes.points = true
9999
else
100100
_cmd, opt_B, opt_J, opt_R = parse_BJR(d, "", "", false, " ")
101101
(opt_R == "") && (opt_R = " -R0/21/0/29")
@@ -105,42 +105,42 @@ function helper_shapes(x, y, cmd; Vd=0, kw...)
105105
opt_O, opt_P = "", " -P"
106106
else
107107
opt_R, opt_J, opt_B, opt_O, opt_P = " -R", " -J", "", " -O", ""
108-
(CTRLshapes.points[1]) && (cmd *= " --PROJ_LENGTH_UNIT=p")
108+
(CTRLshapes.points) && (cmd *= " --PROJ_LENGTH_UNIT=p")
109109
end
110110

111111
out, opt_T, EXT, fname, = GMT.fname_out(d, true)
112112

113-
redirect = (CTRLshapes.first[1]) ? " > " : " >> "
113+
redirect = (CTRLshapes.first) ? " > " : " >> "
114114
if (length(kw) == 0)
115-
cmd = "psxy" * cmd * opt_R * opt_J * opt_B * opt_P * opt_O * " -K" * redirect * CTRLshapes.fname[1]
115+
cmd = "psxy" * cmd * opt_R * opt_J * opt_B * opt_P * opt_O * " -K" * redirect * CTRLshapes.fname
116116
else
117117
d[:Vd] = 2
118118
(opt_J != " -J" && length(opt_J) > 3) && (d[:J] = opt_J[4:end]) # Dirty trick to force assign the J we want
119119
(opt_R != " -R" && length(opt_R) > 3) && (d[:R] = opt_R[4:end])
120120
d[:B] = "none"
121-
cmd = GMT.common_plot_xyz("", nothing, cmd, CTRLshapes.first[1], false; d...)
122-
(CTRLshapes.first[1] && opt_B != "") && (cmd = replace(cmd, "psxy" => "psxy" * opt_B))
121+
cmd = GMT.common_plot_xyz("", nothing, cmd, CTRLshapes.first, false; d...)
122+
(CTRLshapes.first && opt_B != "") && (cmd = replace(cmd, "psxy" => "psxy" * opt_B))
123123
cmd = GMT.finish_PS(d, cmd, out, true, !first)
124124
end
125125
(0 < Vd < 2) && println(cmd); (Vd > 1) && return cmd
126126

127-
if (CTRLshapes.first[1])
128-
if (CTRLshapes.points[1]) cmd *= ps_media # When units are points we always set a specific paper size
127+
if (CTRLshapes.first)
128+
if (CTRLshapes.points) cmd *= ps_media # When units are points we always set a specific paper size
129129
elseif (EXT != "ps") cmd *= " --PS_MEDIA=32767x32767" # Exptend to a larger paper size
130130
end
131131
end
132132

133133
in_data = (length(x) == 1) ? [x y] : [x[:] y[:]]
134134
gmt(cmd, in_data)
135-
CTRLshapes.first[1] = false # To signal next calls that they have to append
135+
CTRLshapes.first = false # To signal next calls that they have to append
136136
fim = ((find_in_dict(d, [:show :fmt :savefig :figname :name], false)[1]) !== nothing) ? true : false
137137
(!fim) && return nothing
138138

139-
CTRLshapes.first[1] = true # Better reset it right now in case next command errors
140-
CTRLshapes.points[1] = false
139+
CTRLshapes.first = true # Better reset it right now in case next command errors
140+
CTRLshapes.points = false
141141
#show_non_consumed(d, cmd)
142-
close_PS_file(CTRLshapes.fname[1])
143-
showfig(d, CTRLshapes.fname[1], EXT, opt_T, false, fname)
142+
close_PS_file(CTRLshapes.fname)
143+
showfig(d, CTRLshapes.fname, EXT, opt_T, false, fname)
144144
end
145145

146146
"""

src/extras/anaglyph.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function anaglyph_3d(G::GMTgrid; zsize=4, azim=190, dazim=2, cmap="gray")
113113

114114
# We do this more convoluted call to grdview to avoid calling it directly (unknown in future GMT_base module)
115115
p_left, p_right = "$(azim)/30/0", "$(azim - dazim)/30/0"
116-
pato = TMPDIR_USR[1] * "/" * "GMTjl_" * TMPDIR_USR[2] * TMPDIR_USR[3] * ".jpg"
116+
pato = TMPDIR_USR.dir * "/" * "GMTjl_" * TMPDIR_USR.username * TMPDIR_USR.pid_suffix * ".jpg"
117117
opt_R = @sprintf("%.15g/%.15g/%.15g/%.15g/%.15g/%.15g", G.range[1], G.range[2], G.range[3], G.range[4], G.range[5], G.range[6])
118118
#grdview(G, J="Q20c", JZ="$zsize", B=:none, C=string(cmap), Q=:i, p=p_left, I=true, figname=pato)
119119
cmd = ["grdview -R$opt_R -JQ20c -JZ$zsize -C$cmap -Qi -p$p_left -I+a-45+nt1"]

0 commit comments

Comments
 (0)