# Gnuplot.jl + Windows 10: mouse can't zoom in/out

**URL:** <https://discourse.julialang.org/t/gnuplot-jl-windows-10-mouse-cant-zoom-in-out/64038>\
**Category:** Visualization\
**Tags:** gnuplot\
**Created:** [July 4, 2021, 1:21pm UTC](https://discourse.julialang.org/t/gnuplot-jl-windows-10-mouse-cant-zoom-in-out/64038 "2021-07-04T13:21:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inna](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@Inna](https://discourse.julialang.org/u/Inna)\
**Post date:** [July 4, 2021, 1:21pm UTC](https://discourse.julialang.org/t/gnuplot-jl-windows-10-mouse-cant-zoom-in-out/64038/1 "2021-07-04T13:21:42Z")

</div>

Dear all,  
I have Windows 10 64-bit, gnuplot Version 5.4 patchlevel 1 (terminal qt) and Julia 1.6.1 with Gnuplot.jl v1.4.0 .

When i use gnuplot without julia: gnuplot\> plot sin(x)  
i get the plot fine. Mouse can zoom in/out, coordinates change and i can set grid with button.

However, when i use gnuplot via Julia: ` using Gnuplot ; @gp 1:20`  
i get the plot, but mouse can’t zoom in/out, coordinates not change and grid button don’t work.

When i run the second time `@gp 1:20`  
i get the error:

```julia
GNUPLOT (default) -> gnuplot> p 
GNUPLOT (default) -> line 42: no datablock named $data1print
GNUPLOT (default) -> gnuplot> rint 'GNUPLOT_CAPTURE_BEGIN'
GNUPLOT (default) -> ^
GNUPLOT (default) -> line 42: invalid command
┌ Error:
└ @ Gnuplot C:\Users\ms\.julia\packages\Gnuplot\jJ4hs\src\Gnuplot.jl:908
ERROR: Gnuplot error: ["invalid command"]
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:33
 [2] gpexec(gp::Gnuplot.GPSession, command::String)
   @ Gnuplot C:\Users\ms\.julia\packages\Gnuplot\jJ4hs\src\Gnuplot.jl:911
 [3] reset(gp::Gnuplot.GPSession)
   @ Gnuplot C:\Users\ms\.julia\packages\Gnuplot\jJ4hs\src\Gnuplot.jl:765
 [4] driver(_args::UnitRange{Int64}; is3d::Bool)
   @ Gnuplot C:\Users\ms\.julia\packages\Gnuplot\jJ4hs\src\Gnuplot.jl:1283
 [5] driver(_args::UnitRange{Int64})
   @ Gnuplot C:\Users\ms\.julia\packages\Gnuplot\jJ4hs\src\Gnuplot.jl:1262
 [6] top-level scope
   @ REPL[6]:1 

```

when i run the third time `@gp 1:20 `, i get the plot (as the first time) without any interaction again…

Please, can you help me with this ? Why the plot isn’t interactive ?  
Thanks a lot !

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [July 4, 2021, 1:57pm UTC](https://discourse.julialang.org/t/gnuplot-jl-windows-10-mouse-cant-zoom-in-out/64038/2 "2021-07-04T13:57:13Z")

</div>

I use the “windows” terminal, or the “wxt” terminal. IIRC it is because I’ve had problems such that you describe. I am not sure why that should be, perhaps incorrect versions of dynamic libs?

---

<div class="post-metadata">

**Author:** ![Inna](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@Inna](https://discourse.julialang.org/u/Inna)\
**Post date:** [July 4, 2021, 4:39pm UTC](https://discourse.julialang.org/t/gnuplot-jl-windows-10-mouse-cant-zoom-in-out/64038/3 "2021-07-04T16:39:58Z")

</div>

Hi,  
I installed gnuplot 5.2.8 and suddenly now it is interactive and mouse works!  
However the same error still exist when i plot second time, but with the third time it’s plot again fine.

---

<div class="post-metadata">

**Author:** ![gcalderone](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gcalderone/32/1539_2.png) [@gcalderone](https://discourse.julialang.org/u/gcalderone)\
**Post date:** [July 4, 2021, 5:38pm UTC](https://discourse.julialang.org/t/gnuplot-jl-windows-10-mouse-cant-zoom-in-out/64038/4 "2021-07-04T17:38:48Z")

</div>

Hi, I am the maintainer of the Gnuplot.jl package. I never saw this problem, but I’m not really surprised since the gnuplot program do not provide any kind of API interface, and the communication between the Julia package and the underlying gnuplot process occurs by means of text sent through a pipeline.

As a quick workaround, could you please try other terminals such as the `windows` or `wxt` ones (as suggested by @PetrKryslUCSD)?

In any case I will try to reproduce the error on a windows machine, and hopefully fix it.

---

<div class="post-metadata">

**Author:** ![Inna](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@Inna](https://discourse.julialang.org/u/Inna)\
**Post date:** [July 4, 2021, 6:31pm UTC](https://discourse.julialang.org/t/gnuplot-jl-windows-10-mouse-cant-zoom-in-out/64038/5 "2021-07-04T18:31:04Z")

</div>

Hello, thanks both of them and nice job for the package.  
Finally, the error stopped with `@gp "set term windows" ` !
