Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What about a gnuplot> REPL mode? #81

Open
favba opened this issue Mar 6, 2018 · 3 comments
Open

What about a gnuplot> REPL mode? #81

favba opened this issue Mar 6, 2018 · 3 comments

Comments

@favba
Copy link
Contributor

favba commented Mar 6, 2018

First of all, thank you for this very useful package!
So, I had this idea, but I really don't know how hard it would be to implement or if it is desirable.
But what about a gnuplot> REPL mode (mainly to pass setting commands to gnuplot)? Similar to shell mode or Pkg3.jl's pkg REPL mode.
I believe this would be really helpful for those already familiar with gnuplot.
Ideally one would be able to do:

julia> using Gaston

julia> a = rand(10);

julia> : # upon typing : (or whichever character is decided), the prompt changes (in place) to: gnuplot>

gnuplot> set logscale x

gnuplot> set  key bottom left

gnuplot> set xtics 1,1,12 nomirror

# press backspace to exit gnuplot REPL mode

julia> plot(a)
@mbaz
Copy link
Owner

mbaz commented Mar 7, 2018

That's an intriguing idea for sure!

I would like to implement this, but I don't know how to implement the custom REPL mode (sending the commands to gnuplot is easy). If a PR implementing this is made, I'll accept it. Otherwise, I'll put it on my todo list and get it done -- someday :)

@mbaz mbaz closed this as completed Mar 7, 2018
@mbaz mbaz reopened this Mar 7, 2018
@mbaz
Copy link
Owner

mbaz commented Mar 8, 2018

BTW, and just in case you're not aware of it, you can do something similar right now with the gpcom ("gnuplot command") option to plot, which allows you to specify commands to run before plotting:

using Gaston
a = rand(10);
plot(a, gpcom="set logscale x; set  key bottom left; set xtics 1,1,12 nomirror")

@favba
Copy link
Contributor Author

favba commented Mar 8, 2018

I was not aware of that! That is extremely useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants