WARNING: using Gaston.plot

How to avoid this alert?
WARNING: using Gaston.plot in module Main conflicts with an existing identifier.
WARNING: using Gaston.figure in module Main conflicts with an existing identifier.

(@v1.5) pkg>> st Gaston
Status `C:\Users\Hermesr\.julia\environments\v1.5\Project.toml`
  [4b11ee91] Gaston v1.0.4
(@v1.5) pkg>test Gaston
    Testing Gaston
Status `C:\Users\Hermesr\AppData\Local\Temp\jl_kgXfrx\Project.toml`
  [35d6a980] ColorSchemes v3.12.0
  [4b11ee91] Gaston v1.0.4
  [8bb1440f] DelimitedFiles
  [9a3f8284] Random
  [8dfed614] Test
Status `C:\Users\Hermesr\AppData\Local\Temp\jl_kgXfrx\Manifest.toml`
  [35d6a980] ColorSchemes v3.12.0
  [3da002f7] ColorTypes v0.10.12
  [5ae59095] Colors v0.12.8
  [53c48c17] FixedPointNumbers v0.8.4
  [4b11ee91] Gaston v1.0.4
  [189a3867] Reexport v1.0.0
  [90137ffa] StaticArrays v1.1.1
  [2a0f44e3] Base64
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [b77e0a4c] InteractiveUtils
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [9a3f8284] Random
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [8dfed614] Test
Test Summary:           | Pass  Total
Figure and set commands |   14     14
Test Summary: | Pass  Broken  Total
2-D plots     |   47       3     50
Test Summary: | Pass  Total
Histograms    |    2      2
Test Summary: | Pass  Total
Images        |    3      3
Test Summary: | Pass  Total
3-D plots     |   12     12
Test Summary: | Pass  Total
Multiplot     |    1      1
Test Summary: | Pass  Total
Saving plots  |    6      6
Test Summary:          | Pass  Total
Tests that should fail |   14     14
    Testing Gaston tests passed
julia> using Gaston
WARNING: using Gaston.plot in module Main conflicts with an existing identifier.
WARNING: using Gaston.figure in module Main conflicts with an existing identifier.

G N U P L O T
Version 5.4 patchlevel 1 last modified 2020-12-01

As far as I know, those warnings indicate that you have previously loaded another plotting package, for example with using Plots. If Gaston is the only loaded plotting package, those warnings should not appear.

1 Like

Get this alert when trying to run the example. Gnuplot.jl works correctly

using Gaston, SpecialFunctions
[ Info: Precompiling Gaston [4b11ee91-296f-5714-9832-002c20994614]
[ Info: Precompiling SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b]

julia> x = y = 0:0.075:10;

julia> postcomm = "set view 45,45; set pm3d lighting primary .5 specular .4"
"set view 45,45; set pm3d lighting primary .5 specular .4"

julia> surf(x, y, (x,y)->besselj0(y)*x^2, plotstyle="pm3d", gpcom=postcomm)
Error showing value of type Gaston.Figure:
ERROR: Gnuplot crashed
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] llplot(::Gaston.Figure; printstring::Nothing) at C:\Users\Hermesr\.julia\packages\Gaston\ctAQy\src\gaston_llplot.jl:174
 [3] llplot at C:\Users\Hermesr\.julia\packages\Gaston\ctAQy\src\gaston_llplot.jl:107 [inlined]
 [4] display(::Gaston.Figure) at C:\Users\Hermesr\.julia\packages\Gaston\ctAQy\src\gaston_aux.jl:87
 [5] #invokelatest#1 at .\essentials.jl:710 [inlined]
 [6] invokelatest at .\essentials.jl:709 [inlined]
 [7] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\REPL.jl:238
 [8] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\REPL.jl:223
 [9] (::REPL.var"#do_respond#54"{Bool,Bool,REPL.var"#64#73"{REPL.LineEditREPL,REPL.REPLHistoryProvider},REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\REPL.jl:822
 [10] #invokelatest#1 at .\essentials.jl:710 [inlined]
 [11] invokelatest at .\essentials.jl:709 [inlined]
 [12] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\LineEdit.jl:2355
 [13] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\REPL.jl:1144
 [14] (::REPL.var"#38#42"{REPL.LineEditREPL,REPL.REPLBackendRef})() at .\task.jl:356

Would you mind opening an issue? Please let me know your OS, gnuplot version, and julia version. I can’t reproduce the problem in my own Linux installation.

If you’re on Windows, please run set(term="qt") before plotting. It seems that some versions of gnuplot have trouble with the default windows terminal (see https://github.com/mbaz/Gaston.jl/issues/161).

https://github.com/mbaz/Gaston.jl/issues

2 Likes

Solution:

julia> using Gaston, SpecialFunctions

julia> **set(term="qt")**

Thanks for your help,

julia> versioninfo()
Julia Version 1.5.4
Commit 69fcb5745b (2021-03-11 19:13 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, haswell)
2 Likes

I’m glad it worked. I’m going to release a new version that fixes this problem in Windows as soon as I have a bit of free itme.

3 Likes