-
-
Notifications
You must be signed in to change notification settings - Fork 372
Gnuplot (GASTON) backend testing #3177
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
Conversation
src/backends/gaston.jl
Outdated
| function _update_plot_object(plt::Plot{GastonBackend}) | ||
| end | ||
|
|
||
| function _show(io::IO, ::MIME"image/png", plt::Plot{GastonBackend}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saving figures would be done through this function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbaz it would be really helpful if you could help me fill this cuntion correctly
Codecov Report
@@ Coverage Diff @@
## master #3177 +/- ##
==========================================
- Coverage 63.76% 62.50% -1.27%
==========================================
Files 25 26 +1
Lines 6450 6641 +191
==========================================
+ Hits 4113 4151 +38
- Misses 2337 2490 +153
Continue to review full report at Codecov.
|
|
@mbaz I wanted to know if communication with gnuplot is possible? Basically |
|
@isentropic If you mean running arbitrary gnuplot commands, it's planned for the next version (mbaz/Gaston.jl#154) As for |
|
http://www.gnuplot.info/docs_5.4/Gnuplot_5_4.pdf |
|
Oh! I thought you meant Julia's This is not supported at the moment -- you can send commands to gnuplot using |
|
Supported args and markers are written in |
|
how do i make this a draft? I presed complete review now its green again |
|
I tested it and it works amazing (from the REPL) so far. Really nice effort! What are your plans? Do you want to keep working on this PR to add more features, or would you rather merge a first basic PR and continue working on new features in other PRs? |
|
@isentropic What do you need for the Awesome work BTW! |
"Convert to draft" is below the reviewer section |
isentropic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbaz Would you please look at these comments? For some reason the saving for pdf, latex, and txt works unexpectedly
| end | ||
| end | ||
|
|
||
| function _show(io::IO, mime::MIME{Symbol("image/png")}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbaz Image/png I believe is for png figures, as gnuplot has a constant dpi I had add some scaling hacks here
| "application/x-tex" => "epslatex", # NEED fixing TODO | ||
| "text/plain" => "dumb", # NEED fixing TODO | ||
| ) | ||
| @eval function _show(io::IO, ::MIME{Symbol($mime)}, plt::Plot{GastonBackend}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbaz, most of the terminals do not work properly and I do not know why. PDF for some reason produces weird output. Also, latex terminals complain about the file format.
|
@daschw Yeah, I think I need to polish up saving and some more plotting args like plot title and legend box positioning. Then perhaps it would cover the bare minimum for simple 2d plots. Later, I'm planning to add colorbar and 3d plots. |
|
@isentropic Great work! |
|
@clad26 I really wanted to have gaston as an invitation for new contributors really. It is an inferior backend that is very lean in codebase (300 lines only). I think people familiar with gnuplot in general will find it easy to contribute and improve on this. Right I would say that a lot of 2d plots work already, but 3d support is not here yet. |
Does it provide histogram yet? |
|
Yeah it works |
|
@clad26 if you are interested in this, let me know what features do you need the most |
|
@isentropic It'd be nice if this can be fully completed and merged as a part of plots Since the artifacts are almost here, this might be good You can tell me from where can I start implementing 3D and what in 2D is left, so that I can help too? Also, I'm interested in the first plot time of Gaston+Plots with the latest version of Plots. It'd be nice if you can update the compat in https://github.com/isentropic/Plots.jl/tree/gnuplot |
|
The important think that prevents me from merging this, is the lack of testing and community feedback. This was an experiment of mine to see if gnuplot can even work as a backend for plots. I'd hold off with implementing 3d. We need to test 2d suite for egregious bugs first (I cannot afford to do testing --- that is to use this on daily basis and see what is missing). Regarding comPat, I'm not sure how to set this up, perhaps you could send a PR to this fork? If you could assist with this backend, I'd be happy to see contribution |
|
@isentropic, we now have Gaston in the docs: https://docs.juliaplots.org/latest/generated/gaston 😉 |



Dear all,
here is the first attempt at making gnuplot (gaston) plots backend. Still very early stage, still testing, too many things remain, but it feels like gnuplot can be a good backend as there have been no hacks implementing it so far.
Please test it like (naturally need to have gaston and gnuplot working beforehand)
Not many things work, in fact, most don't. But I think there is potential to this as it behaved very nice so far. Only tested in repl, but jupyter has to work too. Waiting for reviews from @mbaz
q