Question: Which plotting package seems to have brightest future when it comes to engineering application?
Using Atom/Juno, Julia 1.0.2, Windows 10.
Background and comments: I am working on a PhD in electrical engineering and am evaluating Julia as a possible computational platform for my research in power systems. I like what I am seeing so far. One area I struggle with is plotting packages. I need the following functionality: line plots, 2D/3D scatter, 2D/3D FEM meshes, contour plots, surface plots, GUI window, and animations. So far I have used Plots, GR, and Makie. One of the most important things for me is documentation that includes a lot of code examples I can quickly duplicate and tinker with. I am not experienced enough with any platform to write code from scratch so the completed examples are critical. A couple of observations from limited experience and review of various threads on GitHub and Julia:
Plots: seems the most versatile and stable, documentation was pretty good, but I still struggled to find a good set of example code for all the types of plots I want to make. I get a sense from the threads that development may slow down in favor of Makie?
GR: nice simplicity and speed, but again I struggle to find a good set of example code (maybe I just don’t know where to look). Found a few examples on Josef Heinen’s GitHub page, but it seems like it is capable of a lot more that what I could find examples for.
Makie: Development seems a bit more active. Documentation is good, lots of example code. However, I find this package very slow on my machine (Julia 1.02, Windows 10, Atom/Juno IDE). I see there is an option for precompiling, but it warns about possibly causing problems with the Julia installation and as a novice I don’t want to risk messing things up
I’d appreciate anyone’s comments, thoughts or suggestions on this topic. I have to get this plot functionality figured out or its back to Python and I would prefer to stay with Julia.
GR has great promise but it is a bit more work to use due to lack of examples. For the limited work i’ve done it seems very fast. also the underlying graphical system is wide-open and very easy to get to, so doing custom things is easy. This is the plotting package i hope to be using in the future. i really like it.
plots. i gave up due to the incredibly slow start-up time. my guess is that it’s been improved since it’s been at least 6 months since i used it last (probably longer). there are however a lot of examples, I’m not sure how you aren’t finding any.
makie. i am getting your same results. absurdly slow run times which make it literally unusable. and that makes me really sad. 3D plot package i would most like to be using. also it seems like everytime i upgrade julia something breaks because it has a high level of dependency on lots of other packages. i love the idea of it so much i keep trying…
all of my graph work is done with pyplot. matplotlib is very solid but i find tweaking graphs to do what i want to be somewhat cryptic . the relentless object oriented organization can make things very hard to navigate. however, it has a very rich universe of examples so i’ve been able to find examples to do pretty much everything i’ve wanted to do. also, be aware that you can get access to “unsupported” functionality through the [:keyword] interface and that is very useful.
if you’ve been doing work in python then use julia + pyplot and you’re all set. that’s exactly the path i have been on and it works great.
Plots.jl has tons of example code around. Most plots made in Julia right now are probably with Plots.jl. Types from major packages generally have plot recipes, so plot(a) usually “just works” and then I add a title or something like that and call it a day. But it has some edges, like the legends have to be inside the plot lines and it has the slow startup times. For now, I’d still recommend it for everything.
But Makie is building a recipe system so that extendability of Plots.jl will soon be with Makie, and I plan on giving things like DiffEq and some of the number types plot recipes so most scientific computing stuff should just kind of work when that’s done. However, to use Makie fast you have to add it to your system image.
If you plan to use Makie inside Jupyter I’d recommend waiting until WebGL support is added. I tried converting my lecture notes to Makie and it changed the file sizes from a few hundred KB to a few hundred MB…
Is there a more detailed set of instructions for doing this than what is located in the “Precompile” section of the https://github.com/JuliaPlots/Makie.jl site? I assume this requires re-install of Julia and not something that “adds on” to the existing install?
I think the question of what plotting package has the brightest future is impossible to answer. Most of the good packages today (Plots, GR, PlotlyJS, PyPlot, Gadfly, VegaLite, PGFPlots(X), Makie etc.) are going to stay around, in my opinion. It makes no sense to me to recommend one of these absolutely over any of others, as they are all fairly different and have different philosophies and syntax. All of these packages are able to make extremely pretty plots. Just choose the one you prefer. Although as a user it is nice to get an answer like “this is the best plotting package just use that” the question is essentially as moot as “what car should I buy” or “what instrument should I learn to play”.
As I see the main advantages of each, Plots is very versatile and has the notion of recipes making it well integrated with the julia package ecosystem, GR is very very fast also in terms of time to first plot, PyPlot is very stable, mature and well-documented, Gadfly and VegaLite have intuitive grammar-of-graphics syntax (and quite different looks), PGFPlots (/PGFPlotsX) also have very good documentation and integration with LaTeX output, and Makie is very powerful in terms of 3D and interactivity and an area of very active development.
Thanks for the reply. That’s what I’m discovering. I get down the road with one package only to find it can’t quite do everything I need (or I can’t figure out how to do it). I guess I better buckle in and learn a couple of them thoroughly.
@jleman I’m also a PhD scholar and had the exactly same questions as you have when I started evaluating julia for my research simulations.
From my experience, PyPlots.jl is the best one you can find if are a researcher. The underlying PyPlots python package is very stable and feature rich. I tried GR a few months back, but at that time it had some bugs (not able to zoom etc) which made is difficult to use for my research purposes. Gadfly produces beautiful plots, but there is no option (?) to move legend inside the figure. If you are publishing you results or writing a journal paper, figures with legends outside the plot area is bad as it consumes more space. With PyPlot, my experience is so far good. If you are in linux, use Julia’s Conda.jl for python and install PyPlots.jl. This will install pyplots with QT GUI which have several features over the default GTK GUI you get in linux.
Finally, I will say Plots.jl is also worth a try. As many others pointed out, the Plot Recipes provides an easy way for several common tasks.
PGFPlotsX can do this nicely, eg see this example and others in the gallery. Also, for plots that end up in papers, you can export as TikZ/LaTeX and have the font style and size in plots compatible with the text.
@Mattriks Thanks! This is great news! I didn’t know this is possible. I absolutely love the default aesthetics of gadfly plots. I will check it out again.
@Tamas_Papp This is also amazing. Last time, I tried to do this with PyPlot and ended up generating a Tex file with more size than the corresponding pdf. Maybe next time I will give this a try. Thanks a lot for the info.
Some anecdote you might find helpful concerning the current state as you are specifically asking about atom on windows 10.
Some of my students (atom on windows 10) encountered a situation where they could not get the plot to display consistently, often it would not update or most of the time not display at all. Might be an istance of this one or something else, I did not investigate in depth.
My personal workflow for years has been to use whatever plotting package works (usually gnuplot on linux :-), export a vector format (.svg or in olden times .fig) and then to move legends, labels and change fonts/ font sizes as I like later.
This is a very good suggestion if it is not possible to script/ automatize the plot generation completely and the vector format is small enough in size. Might be complete FEM meshes are a bit much for that, though.