# Julia alternatives to Matplotlib?

**URL:** <https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445>\
**Category:** New to Julia\
**Tags:** question, package, plotting\
**Created:** [August 24, 2020, 8:35am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445 "2020-08-24T08:35:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![derekmahar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/derekmahar/32/216439_2.png) [@derekmahar](https://discourse.julialang.org/u/derekmahar)\
**Post date:** [August 24, 2020, 8:35am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/1 "2020-08-24T08:35:34Z")

</div>

What are some alternatives to Python library [Matplotlib](https://matplotlib.org/) but implemented in Julia?

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [August 24, 2020, 8:42am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/2 "2020-08-24T08:42:30Z")

</div>

Again (like for symbolic math) “equivalence” is quite restricting the possible answers:  
[https://github.com/JuliaPy/PyPlot.jl](https://github.com/JuliaPy/PyPlot.jl)

---

<div class="post-metadata">

**Author:** ![derekmahar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/derekmahar/32/216439_2.png) [@derekmahar](https://discourse.julialang.org/u/derekmahar)\
**Post date:** [August 24, 2020, 8:50am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/3 "2020-08-24T08:50:50Z")

</div>

Yes, I am interested in pure native Julia implementations.

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [August 24, 2020, 9:32am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/4 "2020-08-24T09:32:25Z")

</div>

Makie.jl might be the one you are looking for [GitHub - JuliaPlots/Makie.jl: High level plotting on the GPU.](https://github.com/JuliaPlots/Makie.jl). Disclaimer I have never used it myself.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [August 24, 2020, 10:00am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/5 "2020-08-24T10:00:07Z")

</div>

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 [`UnicodePlots.jl`](https://github.com/Evizero/UnicodePlots.jl)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [August 24, 2020, 10:01am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/6 "2020-08-24T10:01:22Z")

</div>

[GitHub - GiovineItalia/Gadfly.jl: Crafty statistical graphics for Julia.](https://github.com/GiovineItalia/Gadfly.jl) is a pretty popular

> [@nilshg](#):
>
> I don’t think there are any Julia plotting packages that implement a full plotting backend to render and display plots, except for maybe [`UnicodePlots.jl`](https://github.com/Evizero/UnicodePlots.jl)

[GitHub - GiovineItalia/Gadfly.jl: Crafty statistical graphics for Julia.](https://github.com/GiovineItalia/Gadfly.jl) is pretty much that.

---

<div class="post-metadata">

**Author:** ![derekmahar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/derekmahar/32/216439_2.png) [@derekmahar](https://discourse.julialang.org/u/derekmahar)\
**Post date:** [August 24, 2020, 10:01am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/7 "2020-08-24T10:01:32Z")

</div>

By “equivalent”, I mean same purpose and similar features. By “pure native Julia”, I mean implemented entirely in Julia.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [August 24, 2020, 10:21am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/8 "2020-08-24T10:21:43Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![derekmahar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/derekmahar/32/216439_2.png) [@derekmahar](https://discourse.julialang.org/u/derekmahar)\
**Post date:** [August 24, 2020, 10:27am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/9 "2020-08-24T10:27:42Z")

</div>

Entirely =\> 100%

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [August 24, 2020, 10:32am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/10 "2020-08-24T10:32:25Z")

</div>

> [@derekmahar](#):
>
> Entirely =\> 100%

So not equivalent to Matplotlib then?

Anyway, [http://gadflyjl.org](http://gadflyjl.org) is probably the one that does the most composing from within Julia code.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [August 24, 2020, 11:11am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/11 "2020-08-24T11:11:21Z")

</div>

Interestingly, Gadfly appears to be able to create an SVG in pure Julia by relying on Compose as a backend: [Backends · Gadfly.jl](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.

---

<div class="post-metadata">

**Author:** ![derekmahar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/derekmahar/32/216439_2.png) [@derekmahar](https://discourse.julialang.org/u/derekmahar)\
**Post date:** [August 24, 2020, 11:14am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/13 "2020-08-24T11:14:33Z")

</div>

> [@kristoffer.carlsson](#):
>
> So not equivalent to Matplotlib then?

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.

---

<div class="post-metadata">

**Author:** ![derekmahar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/derekmahar/32/216439_2.png) [@derekmahar](https://discourse.julialang.org/u/derekmahar)\
**Post date:** [August 24, 2020, 11:31am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/14 "2020-08-24T11:31:15Z")

</div>

> [@nilshg](#):
>
> 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.

I want to solve the problems in the book [_Doing Math with Python_](https://nostarch.com/doingmathwithpython) in Julia instead of Python and would prefer to use a plotting library written entirely (or closest to entirely) in Julia.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 24, 2020, 11:36am UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/15 "2020-08-24T11:36:30Z")

</div>

> [@derekmahar](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![derekmahar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/derekmahar/32/216439_2.png) [@derekmahar](https://discourse.julialang.org/u/derekmahar)\
**Post date:** [August 24, 2020, 12:05pm UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/16 "2020-08-24T12:05:36Z")

</div>

> [@Tamas\_Papp](#):
>
> This is understood, but we still don’t know _why_ this is so important to you.

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.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [August 24, 2020, 12:16pm UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/17 "2020-08-24T12:16:48Z")

</div>

> [@derekmahar](#):
>
> and would prefer to use a plotting library written entirely (or closest to entirely) in Julia.

Use Gadfly then.

---

<div class="post-metadata">

**Author:** ![derekmahar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/derekmahar/32/216439_2.png) [@derekmahar](https://discourse.julialang.org/u/derekmahar)\
**Post date:** [August 24, 2020, 12:17pm UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/18 "2020-08-24T12:17:22Z")

</div>

> [@DNF](#):
>
> They might call out to other libraries for various things.

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.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 24, 2020, 12:28pm UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/19 "2020-08-24T12:28:41Z")

</div>

> [@derekmahar](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![derekmahar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/derekmahar/32/216439_2.png) [@derekmahar](https://discourse.julialang.org/u/derekmahar)\
**Post date:** [August 24, 2020, 12:53pm UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/20 "2020-08-24T12:53:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [August 24, 2020, 1:01pm UTC](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445/21 "2020-08-24T13:01:05Z")

</div>

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.

[Next page](https://discourse.julialang.org/t/julia-alternatives-to-matplotlib/45445.md?page=2)
