How to clear Gnuplot errors?
fatteneder opened this issue · 0 comments
fatteneder commented
Here is a MWE:
julia> using Gnuplot
julia> @gp :- :test "plot sin(x) linespoints"
┌ Error:
│
│ gnuplot> plot sin(x) linespoints
│ ^
│ line 0: unexpected or unrecognized token: linespoints
└ @ Gnuplot ~/.julia/packages/Gnuplot/7y0ez/src/Gnuplot.jl:897
ERROR: Gnuplot error: ["unexpected or unrecognized token: linespoints"]
The problem is a missing with
in the plot command, it should be "plot sin(x) with linespoints"
. However, rerunning the the fixed command still gives the same error and I have to reset the REPL to get rid of it.
Is there any way to reset a session?
Update: While writing up this issue I found the solution to my problem.
julia> Gnuplot.reset(Gnuplot.getsession(:test))
This clears the error and resets the session so that running the correct command works again.