https://github.com/vincent-picaud/gnuplotscripting.jl
An easy to use and simple gnuplot wrapping in Julia
https://github.com/vincent-picaud/gnuplotscripting.jl
gnuplot julia plotting
Last synced: 9 months ago
JSON representation
An easy to use and simple gnuplot wrapping in Julia
- Host: GitHub
- URL: https://github.com/vincent-picaud/gnuplotscripting.jl
- Owner: vincent-picaud
- License: mit
- Created: 2021-12-10T20:12:02.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-24T19:46:18.000Z (almost 4 years ago)
- Last Synced: 2025-03-17T11:16:57.941Z (9 months ago)
- Topics: gnuplot, julia, plotting
- Language: Julia
- Homepage:
- Size: 245 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://vincent-picaud.github.io/GnuplotScripting.jl/stable)
[](https://vincent-picaud.github.io/GnuplotScripting.jl/dev)
[](https://github.com/vincent-picaud/GnuplotScripting.jl/actions/workflows/CI.yml?query=branch%3Amain)
# GnuplotScripting.jl
An **easy to use** and **simple** `gnuplot` wrapping that allows you
to:
- perform direct rendering of Gnuplot plots from Julia,
- create and save Gnuplot scripts with embedded data,
- easily export Gnuplot figures.
```julia
using GnuplotScripting
# create a gnuplot script
#
gp = GnuplotScript()
# Fake data
#
X=[-pi:0.1:pi;];
Ys =sin.(X);
Yc =cos.(X);
# embed data into the script
#
id=register_data(gp,hcat(X,Ys,Yc))
# usual gnuplot command
#
free_form(gp,"replot '$id' u 1:3 w l t 'cos'")
free_form(gp,"replot '$id' u 1:2 w l t 'sin'")
# png export of the fig
#
export_png("fig.png",gp)
# write gnuplot script
#
write_script("gnuplot_script.gp",gp)
```
That's it!
After running the previous code you will get a nearly immediate plot
of your figure, a `fig.png` image file

and a gnuplot script `gnuplot_script.gp` with embedded data you can
rerun when you want.