# An internal Julia plotting package?

**URL:** <https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [December 14, 2021, 3:12pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079 "2021-12-14T15:12:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [December 14, 2021, 3:12pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/1 "2021-12-14T15:12:31Z")

</div>

My understanding is that right now there are many Julia plotting packages but none of them is quite capable of producing high quality publication ready plots yet, is that right? I wonder if Julia could consider implementing internal Julia plotting capabilities by leveraging the pros of existing plotting packages and filling any gaps?

For example, right now, I can’t even create a figure with multiple subplots, e.g., one of them from the Plots.jl, one of them from the GMT.jl and one of them from Mackie.jl.

I think the lack of strong plotting capabilities is one of the main reasons I can’t quite ditch Matlab yet.

Thanks for your consideration.

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [December 14, 2021, 3:16pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/2 "2021-12-14T15:16:15Z")

</div>

what do you mean by internal?

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [December 14, 2021, 3:17pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/3 "2021-12-14T15:17:30Z")

</div>

Functions that can be called without installing an external Pkg.

---

<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:** [December 14, 2021, 3:24pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/4 "2021-12-14T15:24:43Z")

</div>

You mean a plotting standard library? That seems exceedingly unlikely, given the trend in Julia is to move things out of, rather than into, standard libraries for various reasons (you can search around this forum to find many discussions).

I also don’t think that no plotting package is capable of producing high quality publication ready plots yet, but that might depend on your definition of a high quality publication ready plot. There are certainly many published papers with Julia plots in them, so I presume that the authors of those papers considered the plots publication ready.

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [December 14, 2021, 3:28pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/5 "2021-12-14T15:28:18Z")

</div>

Many thanks for the comments!

Do you know which plotting package is the best to learn?

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [December 14, 2021, 3:42pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/6 "2021-12-14T15:42:26Z")

</div>

Learn makie if you are doing geo-spatial stuff. That way you can have sub-plots from geo-spatial and vanilla plots in the same figure.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [December 14, 2021, 3:43pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/7 "2021-12-14T15:43:22Z")

</div>

I have been using Plots with GR in my work, and I am mostly satisfied with it. Here are some tips I have written some time ago:

> **[Tips to create beautiful, publication-quality plots in Julia](https://nextjournal.com/leandromartinez98/tips-to-create-beautiful-publication-quality-plots-in-julia)**
>
> I was about to send an e-mail to my students with a series of tips to produce good looking plots with Julia, and decided to post the tips here instead. I hope this is useful for more people, and please let me know of any other tips, nice examples,...

Here is one recent figure which I think is quite “publication ready”, in the sense that is very consistent in terms of fonts, etc:

[![](https://global.discourse-cdn.com/julialang/original/3X/4/9/49831b11a8480e046e4fd9c105127cba8b183cd3.png) ](https://raw.githubusercontent.com/m3g/ComplexMixturesExamples/main/POPC_in_Water-Ethanol/results/popc.png)

The script to building it is:

> <https://github.com/m3g/ComplexMixturesExamples/blob/main/POPC_in_Water-Ethanol/results/paper_fig.jl>

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [December 14, 2021, 3:48pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/8 "2021-12-14T15:48:30Z")

</div>

Wonderful. Many thanks for sharing.

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [December 14, 2021, 4:24pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/9 "2021-12-14T16:24:00Z")

</div>

Thanks for the recommendation.

That’s one of the cons of the Julia setup I would think. In Matlab, you can use whatever package to plot a subplot, but it is Matlab who handles the layout of the overall figure. I really think Julia should do the same thing. It unleashes so much more flexibilities.

For example, I want to plot my geo-spatial maps using GMT.jl, does that mean I would have to make my x-y subplots using GMT.jl in the same figure? No, I should be able to make my subplot 1 using Plots.jl, my subplot 2 using GMT.jl, my subplot 3 using Makie.jl, and so on.

---

<div class="post-metadata">

**Author:** ![Lilith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lilith/32/27492_2.png) [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Post date:** [December 14, 2021, 4:36pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/10 "2021-12-14T16:36:25Z")

</div>

I don’t see any fundamental limitations preventing Plots.jl from supporting arbitrary renders (e.g. Makie plots) as subplots.

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [December 14, 2021, 4:36pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/11 "2021-12-14T16:36:31Z")

</div>

> [@leon](#):
>
> I really think Julia should do the same thing.

Well, the good news is that Julia is open-source. So **you** could be the person to implement this! 😉

---

<div class="post-metadata">

**Author:** ![ToucheSir](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/touchesir/32/14411_2.png) [@ToucheSir](https://discourse.julialang.org/u/ToucheSir)\
**Post date:** [December 14, 2021, 4:46pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/12 "2021-12-14T16:46:01Z")

</div>

This need not be in the stdlib though. If there were a common library for this that all the plotting libraries could interop with, you could get the same result.

Speaking more broadly, it’s worth noting that the Julia community is pretty diverse and has an equally diverse set of use cases. For each request asking to bundle more functionality with the base language, there is one asking to slim down the sysimage/compilation size for better deployment. For each request to add some subsystem (e.g plotting) to the stdlib, there is another one asking to remove one for the sake of easier maintenance/latency/etc. Matlab gets around this by only catering to the first group, but I think most here would agree that Julia’s niche should be much larger than Matlab’s!

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [December 14, 2021, 5:03pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/13 "2021-12-14T17:03:04Z")

</div>

Check out [VegaLite.jl](https://github.com/queryverse/VegaLite.jl), we’ve been using it on a current project to produce all of our figures and so far it has proven more than capable to accommodate _a lot_ of very detailed twists and tweaks, certainly publication quality level. The core trick is to start with the VegaLite.jl docs, but then quickly move onto the original [vega-lite docs](https://vega.github.io/vega-lite/) which are very comprehensive. Plus, if VegaLite.jl is not flexible enough, one can always transition to Vega.jl, which has even more degrees of freedom (but is also more verbose).

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [December 14, 2021, 6:28pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/14 "2021-12-14T18:28:22Z")

</div>

> [@leon](#):
>
> In Matlab, you can use whatever package to plot a subplot, but it is Matlab who handles the layout of the overall figure.

In Matlab there is **ONLY** one plotting system so your example

> I should be able to make my subplot 1 using Plots.jl, my subplot 2 using GMT.jl, my subplot 3 using Makie.jl, and so on.

would **NOT** be possible in Matlab. … but in Julia, **yes**. Just produce the individual figures in a raster format and make a mosaic of the subplots out of them. GMT.jl can do it and I’m (almost) sure the others as well.

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [December 14, 2021, 6:35pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/15 "2021-12-14T18:35:18Z")

</div>

In Matlab, I can make subplots using any external Matlab plotting toolboxes. Below is how I normally plot figures in Matlab:

```julia
handle = figure(1)
han01 = subplot(2,2,1)
   plot using whatever package
hand02 = subplot(2,2,2)
   plot using whatever package
han03 = subplot(2,2,3)
   plot using whatever package
hand04 = subplot(2,2,4)
   plot using whatever package.

```

For example, my geo-spatial subplots in Matlab are usually plotted using [M\_maps](https://www.eoas.ubc.ca/~rich/map.html), which is an external mapping toolbox created by someone outside Mathworks.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [December 14, 2021, 6:43pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/16 "2021-12-14T18:43:48Z")

</div>

Have a look at the M\_maps source code. Is calls the Matlab (Java) functions to do the plotting. There is absolutely no way out of this (well, excluding some adventures in calling OpenGL directly). Believe me, I have deep experience with the Matlab plotting system and [Mirone](http://fct-gmt.ualg.pt/mirone/screeshots.html) is a tool that I dreamed to port to Julia but nothing convenient for that has appeared yet.

---

<div class="post-metadata">

**Author:** ![EvoArt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evoart/32/25357_2.png) [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Post date:** [December 14, 2021, 6:50pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/17 "2021-12-14T18:50:46Z")

</div>

That will be down to preference and use cases. But check this out [Beautiful Makie Gallery](https://discourse.julialang.org/t/beautiful-makie-gallery/62523)

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [December 14, 2021, 7:09pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/18 "2021-12-14T19:09:07Z")

</div>

> [@leon](#):
>
> there are many Julia plotting packages but none of them is quite capable of producing high quality publication ready plots yet, is that right?

[This related thread](https://discourse.julialang.org/t/which-plots-backends-currently-are-the-best-for-article-publication/47668) suggests that the claim is largely false.

---

<div class="post-metadata">

**Author:** ![j\_u](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_u/32/219081_2.png) [@j\_u](https://discourse.julialang.org/u/j_u)\
**Post date:** [December 14, 2021, 7:55pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/19 "2021-12-14T19:55:47Z")

</div>

> [@carstenbauer](#):
>
> Well, the good news is that Julia is open-source. So **you** could be the person to implement this! 😉

Edit:  
It seems that @carstenbauer is in a good mood today :-).

Edit:  
I just spotted my previous post was hidden by community flags. Just wanted to add that there was nothing personal nor there were any inappropriate intentions. I see the reason raised was “Your post was flagged as off-topic: the community feels it is not a good fit for the topic, as currently defined by the title and the first post.” I guess that’s possibly the same level of conversation as my interlocutor’s. Anyway, I was in a good mood and decided to express it publicly. Nothing else! 🙂

---

<div class="post-metadata">

**Author:** ![Olivier\_Merchiers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivier_merchiers/32/4073_2.png) [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Post date:** [December 14, 2021, 8:07pm UTC](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079/20 "2021-12-14T20:07:51Z")

</div>

Hi,

I think the best way to see it, is that matlab has a single plotting system.  
All other packages, perform their plotting using that single system.

As was pointed out, in julia there is not one single plotting system, but many such as Plots.jl, Makie.jl, Gadfly.jl, Gaston.jl and many more.

The reason there is no single officially endorsed plotting system, was explained  
by other people here in the thread.

In spite of this, some of those plottings systems offer ways to develop extensions for other packages.  
Most notable example is Plots.jl which has a recipe system which allows third party packages to integrate their plotting with the Plots.jl system. This recipe system allows you to create combined figures using different packages and you should be able to make something like

```julia
han01 = subplot(2,2,1)
   plot using whatever package
hand02 = subplot(2,2,2)
   plot using whatever package
han03 = subplot(2,2,3)
   plot using whatever package
hand04 = subplot(2,2,4)
   plot using whatever package.

```

work within the Plots.jl recipe system as long as every “whatever package” complies with the recipe interface. You can have a look at this [here](http://docs.juliaplots.org/latest/recipes/).

I’m not sure but I think Makie.jl has similar recipe infrastructure. Unfortunately, these recipe systems are not necessarily compatible between each other.

I think people are working or will work in the future on making Make.jl recipes compatible with Plots.jl recipes.

I hope this helps  
Olivier

[Next page](https://discourse.julialang.org/t/an-internal-julia-plotting-package/73079.md?page=2)
