You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am relatively new to Julia in general and GMT.jl in particular. I am facing a bug I am unable to correct. Basically, I want to plot on the same figure the divides of drainage basins defined by shapefiles (.shp). The first one is correctly plotted but the second one creates an error. Here is the code I tested:
I have exactly the same behaviour whether I use lines, scatter or plot. It is not a problem with the second shapefile because if I plot again the first one, I have exactly the same error message. My issue looks similar to this one: https://forum.generic-mapping-tools.org/t/failed-to-plot-large-multiple-polygon-vector-shp-file-in-pygmt/3064 but I have tested different line width and the output is always the same. I suspect that the figure is closed after the first contour is plotted and that the problem is in common_options.jl.
I would be very grateful for any advice and help.
The text was updated successfully, but these errors were encountered:
When you use the show option that finish the figure and shows it. You should only do that in the last command, but you are using it in both plot commands
Hi,
I am relatively new to Julia in general and GMT.jl in particular. I am facing a bug I am unable to correct. Basically, I want to plot on the same figure the divides of drainage basins defined by shapefiles (.shp). The first one is correctly plotted but the second one creates an error. Here is the code I tested:
using GMT
subcatch_1 = gmtread(path_Bas_shp[1], no_islands=true);
plot(subcatch_1, pen=(:thinnest, :black), region=(-82, -40, -24, 8), proj=(name=:eqdc, center=[-66 -6], parallels=[-5 -12]), show=true);
subcatch_2 = gmtread(path_Bas_shp[2], no_islands=true);
plot!(subcatch_2, pen=(:thinnest, :black), show=true);
after the correct plot of the first basin, I get this message:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error: /undefined in A
Operand stack:
0
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1974 1 3 %oparray_pop 1973 1 3 %oparray_pop 1961 1 3 %oparray_pop 1817 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:767/1123(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 40064
psconvert [ERROR]: System call ['/home/ubuntu/.julia/artifacts/4883a6685d86b068da934537a444a6d170d71730/bin/gs' -q -dNOSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox -DPSL_no_pagefill -dMaxBitmap=2147483647 -dUseFastColor=true '/tmp/GMTjl_ubuntu.ps' 2> './psconvert_73850c.bb'] returned error 256.
Something went wrong when calling the module. GMT error number = 79
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] gmt(::String)
@ GMT ~/.julia/packages/GMT/Mxc9g/src/gmt_main.jl:161
[3] showfig(d::Dict{Symbol, Any}, fname_ps::String, fname_ext::String, opt_T::String, K::Bool, fname::String)
@ GMT ~/.julia/packages/GMT/Mxc9g/src/common_options.jl:3929
[4] finish_PS_module(::Dict{Symbol, Any}, ::Vector{String}, ::String, ::Bool, ::Bool, ::Bool, ::GMTdataset{Float64, 2}, ::Vararg{Any})
@ GMT ~/.julia/packages/GMT/Mxc9g/src/common_options.jl:4214
[5] common_plot_xyz(::String, ::GMTdataset{Float64, 2}, ::String, ::Bool, ::Bool, ::Pair{Symbol, Any}, ::Vararg{Pair{Symbol, Any}})
@ GMT ~/.julia/packages/GMT/Mxc9g/src/psxy.jl:285
[6] plot(arg1::GMTdataset{Float64, 2}; first::Bool, kw::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:pen, :show), Tuple{Tuple{Symbol, Symbol}, Bool}}})
@ GMT ~/.julia/packages/GMT/Mxc9g/src/plot.jl:122
[7] plot
@ ~/.julia/packages/GMT/Mxc9g/src/plot.jl:101 [inlined]
[8] #plot!#447
@ ~/.julia/packages/GMT/Mxc9g/src/plot.jl:124 [inlined]
[9] top-level scope
@ In[7]:4
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I have exactly the same behaviour whether I use lines, scatter or plot. It is not a problem with the second shapefile because if I plot again the first one, I have exactly the same error message. My issue looks similar to this one: https://forum.generic-mapping-tools.org/t/failed-to-plot-large-multiple-polygon-vector-shp-file-in-pygmt/3064 but I have tested different line width and the output is always the same. I suspect that the figure is closed after the first contour is plotted and that the problem is in common_options.jl.
I would be very grateful for any advice and help.
The text was updated successfully, but these errors were encountered: