What are some alternatives to Python library Matplotlib but implemented in Julia?
Again (like for symbolic math) “equivalence” is quite restricting the possible answers:
Yes, I am interested in pure native Julia implementations.
Makie.jl might be the one you are looking for https://github.com/JuliaPlots/Makie.jl. Disclaimer I have never used it myself.
What do you mean by “equivalent”? Just in the sense of being a plotting library or in the sense of having the same syntax or specific features? And what do you consider “pure native Julia”? I don’t think there are any Julia plotting packages that implement a full plotting backend to render and display plots, except for maybe
https://github.com/GiovineItalia/Gadfly.jl is a pretty popular
https://github.com/GiovineItalia/Gadfly.jl is pretty much that.
By “equivalent”, I mean same purpose and similar features. By “pure native Julia”, I mean implemented entirely in Julia.
How much is ‘entirely’? Matplotlib is 89% Python, 8% C++, and then a smattering of other languages. Is that enough to be entirely Python?
It’s a bit hard to answer, anyway, it seems. If you go to https://github.com/JuliaPy/PyPlot.jl, it says that pyplot is 100% Julia, but of course, it’s an interface to the python code.
Gadfly.jl and Makie.jl are 100% Julia according to github, but not sure exactly what that means, except that the code in the repository is just Julia. They might call out to other libraries for various things.
Entirely => 100%
So not equivalent to Matplotlib then?
Anyway, http://gadflyjl.org is probably the one that does the most composing from within Julia code.
Interestingly, Gadfly appears to be able to create an SVG in pure Julia by relying on Compose as a backend: http://gadflyjl.org/dev/man/backends/#Backends-1
So maybe this could be considered pure Julia as long as one doesn’t save a png…
It’s maybe a little unproductive though to muse about what is or isn’t “pure”, instead it would probably be more helpful to clarify where the need for “purity” stems from to understand what bits of the plotting library need to be written in Julia to meet the OP’s needs.
Yes, equivalent in purpose and function, but not in programming language composition. In that respect, I’d prefer a 100% (or closest to 100%) Julia implementation.
I want to solve the problems in the book Doing Math with Python in Julia instead of Python and would prefer to use a plotting library written entirely (or closest to entirely) in Julia.
This is understood, but we still don’t know why this is so important to you.
With all other things being equal, of course a native implementation is preferable. But plotting is one of those applications that is full of finicky corner cases and quirks, so pooling resources among various languages actually makes sense.
If you just want to make some 2D plots of math functions, pretty much any reasonably maintained Julia plotting package would do. With the introduction of artifacts, even those that call out to non-native libraries are pretty robust.
It’s not absolutely essential, only a strong preference, though probably not even the best choice given my purpose. It would also satisfy my curiosity of whether there exists such a pure Julia plotting library.
Use Gadfly then.
This would disqualify them as pure Julia, but qualify them if there were no other options. The most straightforward choice would be to just use Python and Matplotlib, but I’m trying to avoid Python. I’m discovering that this is still a challenging goal in math and science.
Not really: if you just don’t want to code in Python, you don’t have to write a single line of it.
What the backend actually uses should be irrelevant per se, as it is not exposed for most packages.
Good point. I should have written, “trying to avoid Python code and Python libraries,” even if those libraries are hidden behind (or underneath) a Julia wrapper.
The Julia compiler isn’t written in Julia. Does that disqualify the language itself?
Not a rhetorical question, I just want to nail down what level of purity we’re talking about.