# Gnuplot (Gaston.jl) backend for Plots

**URL:** <https://discourse.julialang.org/t/gnuplot-gaston-jl-backend-for-plots/64122>\
**Category:** Visualization\
**Tags:** plots, gaston\
**Created:** [July 6, 2021, 3:32am UTC](https://discourse.julialang.org/t/gnuplot-gaston-jl-backend-for-plots/64122 "2021-07-06T03:32:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![isentropic](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/isentropic/32/11894_2.png) [@isentropic](https://discourse.julialang.org/u/isentropic)\
**Post date:** [July 6, 2021, 3:32am UTC](https://discourse.julialang.org/t/gnuplot-gaston-jl-backend-for-plots/64122/1 "2021-07-06T03:32:22Z")

</div>

Dear Plot users,

Experimental gnuplot/gaston.jl backend has been merged into Plots.jl master branch (including a release). My primary goal is to have a lightweight backend in plots that supports REPL plotting. Since many users must be familiar with gnuplot, submitting PRs and extending the gnuplot backend should be easy.

Testing the backend:

Install [Gaston.jl](https://github.com/mbaz/Gaston.jl), by:

```julia
import Pkg; Pkg.update(); 
Pkg.install("Gaston")

```

and make sure that you have operational gnuplot installed in the system. The best way to test it is to see if Gaston.jl standalone package is working correctly for you.

Trying it out:

```julia
using Plots; gaston();
plot(1:10)

```

Currently `src/gaston.jl`is only 300lines long, so it should be easy for people eager to contribute to Plots to jump in. Browsing the source code should give an idea how Plots.jl works and what it takes to add new functionality.

Limitations:

1. 2d Plots only (TODO add 3d plots)
2. Simple grid layout
3. Restricted saving options (TODO)
4. No colorbars
5. No docs
6. More…

We are looking for more contributors and maintainers across all backends. If you were overwhelmed by Plots codebase before, perhaps browsing and understanding Gaston.jl backend code would help you to join the Plots developer community easily.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [October 17, 2021, 2:36pm UTC](https://discourse.julialang.org/t/gnuplot-gaston-jl-backend-for-plots/64122/2 "2021-10-17T14:36:53Z")

</div>

Thanks for putting this work together and add one more important backend to `Plots.jl`, as it has the most convenient syntax.

Some feedback from Windows 10 (Julia 1.7, Plots v1.22.4, Gaston v1.0.4):

- Installing a recent version (5.4) of gnuplot for Windows causes hanging problems. The gaston() plot will display fine in a Qt window but, that window always freezes. This issue seems to have been [reported in SO](https://stackoverflow.com/questions/67703847/gnuplot-hanging-under-windows-10).

- Gnuplot [Version 5.2.8 from Sourceforge.net](https://sourceforge.net/projects/gnuplot/files/gnuplot/) works fine. Used installer: _gp528-win64-mingw.exe_

---

<div class="post-metadata">

**Author:** ![mbaz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbaz/32/17295_2.png) [@mbaz](https://discourse.julialang.org/u/mbaz)\
**Post date:** [October 17, 2021, 3:10pm UTC](https://discourse.julialang.org/t/gnuplot-gaston-jl-backend-for-plots/64122/3 "2021-10-17T15:10:16Z")

</div>

When gnuplot misbehaves on Windows, it’s sometimes useful to set the default terminal to “windows” instead of qt.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [October 17, 2021, 3:32pm UTC](https://discourse.julialang.org/t/gnuplot-gaston-jl-backend-for-plots/64122/4 "2021-10-17T15:32:48Z")

</div>

Followed your suggestion and installed windows terminal option for the latest version (_gnuplot 5.4 patchlevel2_), but still got the same hanging issue: ![gnuplot_5.4_patchlevel2_hanging](https://global.discourse-cdn.com/julialang/original/3X/a/e/aed410338ab780cd16b484c42321948b356898b6.png)  
will thus revert back to 5.2.8.

---

<div class="post-metadata">

**Author:** ![mbaz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbaz/32/17295_2.png) [@mbaz](https://discourse.julialang.org/u/mbaz)\
**Post date:** [October 17, 2021, 4:10pm UTC](https://discourse.julialang.org/t/gnuplot-gaston-jl-backend-for-plots/64122/5 "2021-10-17T16:10:53Z")

</div>

Yeah, unfortunately it doesn’t always work. Fortunately, 5.2.8 is pretty solid.
