GenericMappingTools / GMT.jl

Generic Mapping Tools Library Wrapper for Julia
Other
191 stars 28 forks source link

gmtbegin & gmtend(:show) code block cannot embed figure in Jupyter notebook #1402

Closed melodyjulia closed 3 months ago

melodyjulia commented 3 months ago

I tried the following code snippet in Jupyter notebook environment under Linux or MacOS:

x = collect(1:10)

gmtbegin()
basemap(limits=(1,10,-1,1),title="test")
lines(x,sin.(x),legend="sin(x)")
lines(x,cos.(x),legend="cos(x)")
legend(position=(inside="RT",width=1.5))
gmtend(:show)

Instead of showing figure embedded in the Jupyter environment, it opens an external application to view the generated PS file.

joa-quim commented 3 months ago

I hope I had fixed that in the new 1.12.1 version.

melodyjulia commented 3 months ago

yes, it works now. Thank you!