# Beautiful Makie Gallery

**URL:** <https://discourse.julialang.org/t/beautiful-makie-gallery/62523>\
**Category:** Package Announcements\
**Created:** [June 7, 2021, 2:29pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523 "2021-06-07T14:29:56Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![lazarusA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lazarusa/32/6571_2.png) [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Post date:** [June 9, 2021, 3:44pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/41 "2021-06-09T15:44:40Z")

</div>

just create a new folder env, and you install there just the things that you need.

[https://pkgdocs.julialang.org/v1.2/environments/](https://pkgdocs.julialang.org/v1.2/environments/)

something like this:

```julia
 lalonso@lap ~ % mkdir newenv
 lalonso@lap ~ % cd newenv
 lalonso@lap ~ % julia
] activate .
] add GLMakie CairoMakie Makie

```

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [June 9, 2021, 3:50pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/42 "2021-06-09T15:50:29Z")

</div>

Double axis would also not be hard to add, the `LineAxis` object is already an axis that you can place wherever (currently only horizontal or vertical though). So you could just place one next to an existing axis, but currently it’s a bit manual. I wanted to maybe make a layoutable out of it, so you can just place it in layout cells like other things.

---

<div class="post-metadata">

**Author:** ![VivMendes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vivmendes/32/16477_2.png) [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Post date:** [June 9, 2021, 3:51pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/43 "2021-06-09T15:51:47Z")

</div>

@lazarusA , thanks.

---

<div class="post-metadata">

**Author:** ![ggggggggg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ggggggggg/32/265_2.png) [@ggggggggg](https://discourse.julialang.org/u/ggggggggg)\
**Post date:** [June 9, 2021, 5:07pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/44 "2021-06-09T17:07:48Z")

</div>

Great work!

Inspired by this I installed `GLMakie` and started following the tutorial. I filed one minor issue about zooming too far spewing out a big error. But I also had a question I couldn’t find the answer to in the documentation, which is how to zoom back out? Is there a keyboard shortcut or a way to add a toolbar with a home button kind of like `matplotlib`?

I use the `matplotlib` [gallery](https://matplotlib.org/2.0.2/gallery.html) regularly, and find it super useful. This looks very similar, and the plots all look beautiful as the name suggests. I’d like a view where you can just scroll through and see all the plots rather than have to click down a menu to try to find the one I’m looking for. The home page is almost this, but it seems to just have one plot per section, rather than all plots from each section.

Also the “Dashboards” and “Test NDVI” examples dont work for me on chrome on windows.

---

<div class="post-metadata">

**Author:** ![feanor12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/feanor12/32/8212_2.png) [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Post date:** [June 9, 2021, 5:28pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/45 "2021-06-09T17:28:00Z")

</div>

[https://lazarusa.github.io/BeautifulMakie/surfWireLines/surfaceComplexF/](https://lazarusa.github.io/BeautifulMakie/surfWireLines/surfaceComplexF/)  
This plot might benefit from a cyclic colormap like `romaO` or `phase`

---

<div class="post-metadata">

**Author:** ![lazarusA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lazarusa/32/6571_2.png) [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Post date:** [June 9, 2021, 5:56pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/46 "2021-06-09T17:56:28Z")

</div>

what is missing is the colorbar, so that you can see why I choose that colormap…  
see for insntace this other example…

[https://lazarusa.github.io/BeautifulMakie/contour/ContourComplexF/](https://lazarusa.github.io/BeautifulMakie/contour/ContourComplexF/)

where is easy to see what is -pi and what is pi… `roma` could also work, `phase` not really.

---

<div class="post-metadata">

**Author:** ![lazarusA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lazarusa/32/6571_2.png) [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Post date:** [June 9, 2021, 5:58pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/47 "2021-06-09T17:58:45Z")

</div>

yes, the homepage is suppose to be that, give it time.

- Dashboards” and “Test NDVI” are still WIP, I do most of the heavy stuff during the weekends, so let’s hope to have that fixed soon, 😃

---

<div class="post-metadata">

**Author:** ![feanor12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/feanor12/32/8212_2.png) [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Post date:** [June 9, 2021, 6:17pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/48 "2021-06-09T18:17:01Z")

</div>

Ah, I was not sure if you want to show the jump as -pi and pi should be the same value.

This might also be interesting , but it is a bit off-topic.  
[https://www.nature.com/articles/s41467-020-19160-7](https://www.nature.com/articles/s41467-020-19160-7)

---

<div class="post-metadata">

**Author:** ![Humphrey\_Lee](https://avatars.discourse-cdn.com/v4/letter/h/a88e4f/32.png) [@Humphrey\_Lee](https://discourse.julialang.org/u/Humphrey_Lee)\
**Post date:** [June 10, 2021, 7:56am UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/49 "2021-06-10T07:56:27Z")

</div>

The scatter with histogram is great. Is it possible to make the histogram as stacked histogram if the data has category data?

---

<div class="post-metadata">

**Author:** ![lazarusA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lazarusa/32/6571_2.png) [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Post date:** [June 11, 2021, 4:47pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/50 "2021-06-11T16:47:31Z")

</div>

It is, one could do it manually, but at this point I think is better to use [AlgebraOfGraphics](http://juliaplots.org/AlgebraOfGraphics.jl/stable/) (AoG) to do the grouping operations and then go back to regular Makie and put everything together. The following figure is compose from outputs from AoG and regular makie (density!, it seems like vertical and horizontal orientations don’t work in AoG, yet). Which is great!. Thanks to @piever for the tips. This stuff even works with 3d axis.

[https://lazarusa.github.io/BeautifulMakie/ScattersLines/penguinsAoGsides/](https://lazarusa.github.io/BeautifulMakie/ScattersLines/penguinsAoGsides/)

 ![penguinsAoGsides](https://global.discourse-cdn.com/julialang/original/3X/8/7/87f008c531eb880784fcbb871fccb6013dc36bbd.png) ![penguinsAoGsides3d](https://global.discourse-cdn.com/julialang/original/3X/0/9/0935235bf8d705fa448a030ac63b36cc32c27ecf.png)

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [June 11, 2021, 5:05pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/51 "2021-06-11T17:05:05Z")

</div>

This is way beyond Ordinary Wizarding Levels, man!

---

<div class="post-metadata">

**Author:** ![mthelm85](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mthelm85/32/224164_2.png) [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Post date:** [June 11, 2021, 5:31pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/52 "2021-06-11T17:31:28Z")

</div>

> Here is something, I think Makie still cannot do. Here is a challenge for anyone to reproduce this kind of graphics in Makie

This isn’t the same but I’d be surprised if you couldn’t produce your plot in Makie.jl:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/5/c55ce16e3be75950671b6720ed78b00052d365b3.jpeg)

Code (from April '20):

```julia
using ForwardDiff
using Makie # v0.10.0
using StatsMakie # v0.2.3

f(x,y) = -5*x*y*exp(-x^2-y^2)
x = -1:0.1:1.0
y = -1:0.1:1.0
z = [f(i,j) for i in x, j in y]

xy = [(i,j) for i in x for j in y]
# This is the same function as above, just modified so that it will work with ForwardDiff
g(x,y) = [-5*x*y*exp(-x^2-y^2)]
# Jacobians are scaled by 0.05 so that the vector arrows aren't too long when plotted
J = .05 .* [ForwardDiff.jacobian(x -> g(x[1], x[2]), [i[1],i[2]]) for i in xy]
# All the x coordinates
xs = [xy[i][1] for i in 1:length(xy)]
# All the y coordinates
ys = [xy[i][2] for i in 1:length(xy)]
# We need u,v for the quiver plot
u = [J[i][1] for i in 1:length(J)]
v = [J[i][2] for i in 1:length(J)]

scene = surface(x,y,z)
xm, ym, zm = minimum(scene_limits(scene))
contour!(scene, x, y, z, levels = 15, linewidth = 2, transformation = (:xy, zm))
arrows!(xs,ys,u,v, arrowsize=0.025, linewidth=0.5, transformation = (:xy, zm))
wireframe!(scene, x, y, z, overdraw = true, transparency = true, color = (:black, 0.1))
center!(scene) # center the Scene on the display

```

EDIT:

 ![test](https://global.discourse-cdn.com/julialang/original/3X/d/4/d4a63402dc7262f9f7efa08bf3397791c97273ec.png)

I had to cheat by increasing the z values to get the contour lines on top of the surface, hopefully there’s a better way to do that (because there’s a noticeable space 😉). The code is mostly the same as above, just a few changes:

```julia
scene = surface(x,y,z)
xm, ym, zm = minimum(scene_limits(scene))
contour3d!(scene, x, y, z .+ 0.04, levels = 15, linewidth = 2, color=(:black, 0.5))
wireframe!(scene, x, y, z, overdraw = true, transparency = true, color = (:black, 0.1))

```

---

<div class="post-metadata">

**Author:** ![lazarusA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lazarusa/32/6571_2.png) [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Post date:** [June 11, 2021, 8:09pm UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/53 "2021-06-11T20:09:27Z")

</div>

I will tweak a little bit this example and will put it into the gallery, ok?

Ok. This is getting out of hand :D, enough. Here, an updated version (I prefer a streamplot rather than arrows).

 ![theme_dark_Contour3d](https://global.discourse-cdn.com/julialang/original/3X/6/e/6ef6e4a6467289d2ed8f226112b5741b17ca4b2d.png)

the code is here:  
[https://lazarusa.github.io/BeautifulMakie/withTheme/theme\_dark\_Contour3d/](https://lazarusa.github.io/BeautifulMakie/withTheme/theme_dark_Contour3d/)

---

<div class="post-metadata">

**Author:** ![Humphrey\_Lee](https://avatars.discourse-cdn.com/v4/letter/h/a88e4f/32.png) [@Humphrey\_Lee](https://discourse.julialang.org/u/Humphrey_Lee)\
**Post date:** [June 12, 2021, 12:47am UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/54 "2021-06-12T00:47:19Z")

</div>

Thank you. This is absolutely beautiful.

---

<div class="post-metadata">

**Author:** ![liuyxpp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuyxpp/32/9870_2.png) [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Post date:** [June 12, 2021, 1:19am UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/55 "2021-06-12T01:19:05Z")

</div>

I am extremely curious that why you Makie users don’t adopt popular color themes such as Tableau-10 or ColorBrewer2 for discrete lines, and Viridis for colormaps. See [Palettable](https://jiffyclub.github.io/palettable/) for details. These three colors (orange, green, purple) are too saturated. Thus the bar plots are somewhat ugly. The shaded colors with alpha values, though, are more pleasant.

---

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [June 12, 2021, 1:59am UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/56 "2021-06-12T01:59:37Z")

</div>

Afaik a Makie theme library doesn’t exist yet.

---

<div class="post-metadata">

**Author:** ![liuyxpp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuyxpp/32/9870_2.png) [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Post date:** [June 12, 2021, 3:09am UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/57 "2021-06-12T03:09:23Z")

</div>

However, what I see is that most of Makie plots shown in discourse and Makie websites use that consistent color theme. May I say this is the de-facto color theme of Makie?

---

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [June 12, 2021, 3:19am UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/58 "2021-06-12T03:19:15Z")

</div>

~~I mention the absence of Makie theme libraries not to disagree with your point, but to answer your question as to why Makie users (or at least one Makie user) don’t use ColorBrewer themes: if [MakieThemes.jl](https://github.com/JuliaPlots/MakieThemes.jl) were maintained and had ColorBrewer themes, I would be using them. The tool just isn’t available yet.~~

---

<div class="post-metadata">

**Author:** ![lazarusA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lazarusa/32/6571_2.png) [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Post date:** [June 12, 2021, 5:03am UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/59 "2021-06-12T05:03:24Z")

</div>

if your are referring to [this plot](https://lazarusa.github.io/BeautifulMakie/ScattersLines/penguinsAoGsides3d/), that is not a theme, and the choice of colours is due to this reference: [palmerpenguins R data package • palmerpenguins](https://allisonhorst.github.io/palmerpenguins/) nothing more(maybe putting some transparency will improve also the histograms, as in the R examples).

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [June 12, 2021, 5:56am UTC](https://discourse.julialang.org/t/beautiful-makie-gallery/62523/60 "2021-06-12T05:56:21Z")

</div>

Makie’s default palette is from a nature paper about color choice in scientific publications, the default colormap is viridis, so I think there’s no problem there. Lazaro’s examples just exercise a lot of functionality for demonstration purposes I think, not necessarily to convince that purple and orange are the way to go generally.

You don’t need a theme library to set your colors to colorbrewer palettes, just set the cycle colors to a palette of your choice, they’re all there [http://makie.juliaplots.org/stable/generated/colors.html#colorbrewer](http://makie.juliaplots.org/stable/generated/colors.html#colorbrewer)

[Previous page](https://discourse.julialang.org/t/beautiful-makie-gallery/62523.md?page=2)

[Next page](https://discourse.julialang.org/t/beautiful-makie-gallery/62523.md?page=4)
