# \[ANN\] Makie v.0.13

**URL:** <https://discourse.julialang.org/t/ann-makie-v-0-13/61522>\
**Category:** Package Announcements\
**Tags:** makie\
**Created:** [May 20, 2021, 3:06pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522 "2021-05-20T15:06:54Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [May 20, 2021, 3:06pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/1 "2021-05-20T15:06:54Z")

</div>

Hi everybody,

We’ve got another Makie update for you! This one includes one big change and a couple smaller ones. Although we’ve tagged breaking releases across the board, the effort on your side to update your code should be minimal. Thanks to @sdanisch @ffreyer and @piever for their work on this and AlgebraOfGraphics, that makes use of some of the new features in its upcoming version.

Here’s a quick rundown of the biggest changes:

# AbstractPlotting renamed to Makie

Many people were rightly confused that we advised actively against installing `Makie.jl` in the last months. The reason was that years ago, there was only the GLMakie backend, the AbstractPlotting infrastructure package, and the Makie.jl package tying those two components up for convenience.

With CairoMakie and WGLMakie maturing, it doesn’t make sense anymore to bundle GLMakie and AbstractPlotting under the main Makie.jl name. Therefore, we have decided to rename AbstractPlotting.jl to Makie.jl. AbstractPlotting is effectively obsolete. There is no more bundle package, all backends should be installed directly. You still don’t have to install `Makie.jl` explicitly because it comes as a dependency of each backend anyway.

To update your code, it should be enough to search and replace `AbstractPlotting` with `Makie`.

# Centered heatmaps

Heatmaps are now by default centered on the x and y values passed in. Before, the endpoints of x and y would specify the edges of the heatmap.

```julia
heatmap(randn(5, 5), axis = (aspect = 1,))

```

 ![centered heatmap](https://global.discourse-cdn.com/julialang/original/3X/6/f/6fad97fd3136451699661e442405e966ab7d78e8.png)

# Irregular heatmaps

The centering change goes together with the new option to plot irregular heatmaps, where the bins are of different rectangular sizes.

```julia
heatmap(sqrt.(0:10:100), sqrt.(0:10:100), randn(11, 11),
    axis = (title = "Irregular heatmap", aspect = 1,))

```

 ![irregular heatmap](https://global.discourse-cdn.com/julialang/original/3X/0/6/062ddaa0c6f741289626c2c61c441fc764cbb599.png)

# Fixed arrows

Arrows used to work a bit unreliably across CairoMakie and GLMakie. Now, you have data independent arrow tip sizes by default which looks much more polished.

```julia
f = Figure(resolution = (700, 700))
Axis(f[1, 1], backgroundcolor = "black")

xs = LinRange(0, 2pi, 20)
ys = LinRange(0, 3pi, 20)
us = [sin(x) * cos(y) for x in xs, y in ys]
vs = [-cos(x) * sin(y) for x in xs, y in ys]
strength = vec(sqrt.(us .^ 2 .+ vs .^ 2))

as = arrows!(xs, ys, us, vs, lengthscale = 0.3,
    arrowcolor = strength, linecolor = strength)

f

```

 ![arrows](https://global.discourse-cdn.com/julialang/original/3X/f/0/f0420ef2e005b3eadd8eaf5f9d61c1669c2965fd.png)

# [Plot object theming](https://makie.juliaplots.org/dev/theming.html#Theming-plot-objects)

Before, you could not theme specific plot objects separately, this is now fixed. This allows you to set up much more elaborate themes. There are also a couple of changes in the default theme, and a couple of new global attributes, such as `linecolor`, `markercolor`, `patchcolor`, `linewidth`, `markersize`, `strokewidth`, `strokecolor`, `patchstrokewidth`, `patchstrokecolor`. Many recipes inherit these values so you can change them in one place rather than for every recipe.

```julia
with_theme(Lines = (linewidth = 5, linestyle = :dash)) do
    lines(cumsum(randn(50)))
end

```

 ![plot object theming](https://global.discourse-cdn.com/julialang/original/3X/9/c/9c3af11b0091779382f3b9451346d8a391cad8cc.png)

# [Cycling](https://makie.juliaplots.org/dev/theming.html#Cycles)

Plot attributes can now be cycled. This is by default enabled for `color` for a lot of recipes, but can be themed separately. Cycling currently works with Axis and Axis3 only.

You can theme the palettes that cycling chooses from and theme which attributes should be cycled for each plot type. This allows for example to create a black-and-white theme in which lines don’t cycle colors but linestyles.

```julia
f = Figure()
ax1 = Axis(f[1, 1])
ax2 = Axis(f[2, 1], palette = (
    color = [:red, :green, :blue, :cyan, :magenta, :orange],))
for ax in [ax1, ax2], i in 1:6
    data = cumsum(randn(50))
    lines!(ax, data)
    scatter!(ax, data, markersize = 7)
end
f

```

 ![cycling](https://global.discourse-cdn.com/julialang/original/3X/7/0/70b2daf4c2c4920d0e0f034495ebd593a89cc8e7.png)

---

<div class="post-metadata">

**Author:** ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)\
**Post date:** [May 20, 2021, 3:12pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/2 "2021-05-20T15:12:23Z")

</div>

Thank you for all the work, @sdanisch @jules @piever and @ffreyer!

The cycling is really a user experience improvement and the Makie ecosystem looks more polished by the day. It starts to feel like v1.0 is not very far!

---

<div class="post-metadata">

**Author:** ![RoyiAvital](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/royiavital/32/571_2.png) [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Post date:** [May 20, 2021, 4:19pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/3 "2021-05-20T16:19:29Z")

</div>

This is really nice though it the indices are centers what the `5` is doing at the 2nd example? Or the labels are not obligated to be centered?

Moreover, is anyone working towards data exploration on the output?  
Namely being able to travel on the data and for each point see its values?

It is the most missing feature from MATLAB figure’s in Julia (Python as well).

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [May 20, 2021, 4:37pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/4 "2021-05-20T16:37:12Z")

</div>

Super exciting update! Installing it now to give it a try. 🎉

Congratulations to the team!

---

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [May 20, 2021, 4:45pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/5 "2021-05-20T16:45:45Z")

</div>

Lots of great stuff in there, congratulations on this nice release! 🙂

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [May 20, 2021, 4:55pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/6 "2021-05-20T16:55:14Z")

</div>

Love this! Thank you for all your hard work!

---

<div class="post-metadata">

**Author:** ![ffreyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffreyer/32/21569_2.png) [@ffreyer](https://discourse.julialang.org/u/ffreyer)\
**Post date:** [May 20, 2021, 5:56pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/7 "2021-05-20T17:56:06Z")

</div>

In the irregular case the borders are halfway between the positions you put in. I.e. `[1, 3, 4]` would produces cells `(0, 2), (2, 3.5), (3.5, 4.5)`.

With respect to data exploration - we also merged `DataInspector`, which tries to give you helpful tooltips when you hover various plot elements.

> **Example Code**
>
> using GLMakie, FileIO
> 
> fig = Figure()  
> x = DataInspector(fig)  
> heatmap(fig[1, 1], rand(20, 20))  
> image(fig[1, 2], rand(20, 20))  
> hist(fig[2, 1], rand(100))  
> a = Axis(fig[2, 2])  
> scatter!(a, rand(10))  
> lines!(a, rand(10))  
> fig
> 
> fig = Figure()  
> s = LScene(fig[1, 1])  
> f = 2  
> ground = f .\* rand(4, 4)  
> for \_ in 1:6  
> f = 0.5f  
> new = f .\* rand((2 .\* size(ground) .- 1)…)  
> for i in axes(new, 1), j in axes(new, 2)  
> l = div(i+1, 2); r = div(i+2, 2)  
> b = div(j+1, 2); t = div(j+2, 2)  
> new[i, j] += 0.25 \* (ground[l, b] + ground[l, t] + ground[r, b] + ground[r, t])  
> end  
> ground = new  
> end
> 
> surface!(s, 0…20, 0…20, ground, colormap=:terrain)
> 
> cat = load(Makie.assetpath(“cat.obj”))  
> texture = load(Makie.assetpath(“diffusemap.tga”))  
> m = mesh!(s, cat, color=texture)  
> rotate!(m, Vec3f0(1, 0, 0), pi/2)  
> translate!(m, Vec3f0(10, 10, ground[div(end, 2), div(end, 2)]))
> 
> meshscatter!(s, [20 .\* rand(Point3f0) .+ Point3f0(0,0,2) for \_ in 1:100], markersize = Vec3f0(0.1, 0.1, 0.3), color = :lightblue)  
> x = DataInspector(s)  
> fig

![inspect2d](https://global.discourse-cdn.com/julialang/original/3X/1/1/11808e14be1c7e20a5f9656afa22e456fc588b3d.gif)  
 ![inspect3d](https://global.discourse-cdn.com/julialang/original/3X/9/d/9d1fd85bee350afe87960d5a64b05a94d4ed7f60.gif)

There have also been changes to events, which I suppose is more of a backend thing but it fixes some issues with events reaching the wrong things. For example, clicking on a menu item should no longer trigger things below that. If you are using `events(scene)` to do something you may get some warnings though.

---

<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:** [May 20, 2021, 5:58pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/8 "2021-05-20T17:58:22Z")

</div>

Oh yeah the data inspector is something I had no part in and which I therefore promptly forgot! That is something _a lot_ of people have asked for and which @ffreyer did a great job implementing

---

<div class="post-metadata">

**Author:** ![ffreyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffreyer/32/21569_2.png) [@ffreyer](https://discourse.julialang.org/u/ffreyer)\
**Post date:** [May 20, 2021, 6:08pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/9 "2021-05-20T18:08:15Z")

</div>

There are a lot of plots I don’t use and didn’t write specialized tooltips for. So I expect some of them to be unhelpful. If you find any please open an issue or ask about it on Slack so we can fix it

---

<div class="post-metadata">

**Author:** ![ffreyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffreyer/32/21569_2.png) [@ffreyer](https://discourse.julialang.org/u/ffreyer)\
**Post date:** [May 20, 2021, 6:15pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/10 "2021-05-20T18:15:34Z")

</div>

Another change from my side - 3d `arrows` are now fully mesh based and use a higher quality mesh (which you can downgrade by passing `quality = 10`, for example). This also affects 3d streamplots iirc.

 ![Screenshot from 2021-05-20 20-12-10](https://global.discourse-cdn.com/julialang/original/3X/f/e/febf18f5052b4bf071df73838207e6f4ba02d767.png)

---

<div class="post-metadata">

**Author:** ![nhardy](https://avatars.discourse-cdn.com/v4/letter/n/9fc348/32.png) [@nhardy](https://discourse.julialang.org/u/nhardy)\
**Post date:** [May 20, 2021, 6:28pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/11 "2021-05-20T18:28:17Z")

</div>

This is fantastic! I’ve been following Makie for a while (and used it for some 3D scenes) but I haven’t yet been able to justify using it for everyday plotting - until now. The svg output with CairoMakie solved one problem, MakieLayout and its theming solved another (and for the record, MakieLayout might be best layout/theming experience I’ve had with a plotting packaging, I love being able to link axes and hide the ticks one one of them), but without color cycling I couldn’t make the jump. So excited to try this new release! The other improvements (especially theming plot types) are just icing on the cake for me. Congratulations to everyone who has brought Makie to this point!

---

<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:** [May 20, 2021, 6:32pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/12 "2021-05-20T18:32:16Z")

</div>

I see how to customize “cycling” in the docs but I’m not 100% sure what cycling is: The name makes it sound like it maps between values and `Iterators.cycle(colors)`. Is that right?

If so, I think that breaks the one-to-one correspondence between colors and values if there are more values than colors. This breakage is the same reason that dual-axis plots are hard to read – looking at an aesthetic on the plot, I should be able to uniquely identify the corresponding value in the data. I would generally rather use more colors by default than break that important correspondence.

---

<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:** [May 20, 2021, 6:41pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/13 "2021-05-20T18:41:56Z")

</div>

Yes it is better to have as many colors as you have groups, the `cycle` name does not suggest to actually cycle colors as in repeat them. It rather “cycles through” a palette that you choose automatically. There can be more than one, for example cycling through colors and linestyles simultaneously if you require that.

```julia
with_theme(
    palette = (
        color = [:black, :gray],
        linestyle = [:solid, :dash, :dot],
    ),
    Lines = (
        cycle = [:color, :linestyle],
    )) do

    f = Figure()
    Axis(f[1, 1])

    for i in 1:6
        lines!(cumsum(randn(50)))
    end
    f
end

```

 ![cycle_example](https://global.discourse-cdn.com/julialang/original/3X/8/1/8100d9b90299125216c938f625163883504d5b9c.png)

---

<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:** [May 20, 2021, 6:51pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/14 "2021-05-20T18:51:38Z")

</div>

Sounds good. (That would be helpful for the docs.)

Btw is there a changelog for recent releases in the docs somewhere?

---

<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:** [May 20, 2021, 6:53pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/15 "2021-05-20T18:53:32Z")

</div>

No, we’ve been struggling a bit with a good changelog. Ideally the merged PRs should give you a good idea of what was done, but of course that tends to not be as readable as a manual summary (which is just more work)

---

<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:** [May 20, 2021, 7:03pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/16 "2021-05-20T19:03:07Z")

</div>

Just a thought…some projects use a policy where, in addition to developer-facing commit logs, all changes need a _user-facing_ entry in the `changelog/` directory, even if it’s just an annotation that the change is not public-facing, which can be automatically excluded from the rendered changelog at release time.

---

<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:** [May 20, 2021, 7:05pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/17 "2021-05-20T19:05:11Z")

</div>

Maybe make an issue? I’d be all for it, if it’s not too much overhead

---

<div class="post-metadata">

**Author:** ![RoyiAvital](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/royiavital/32/571_2.png) [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Post date:** [May 20, 2021, 7:31pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/18 "2021-05-20T19:31:17Z")

</div>

Wow! This is a great progress!

Now, adding option to add a tool tip by `Alt + Click` to stay there would make it comparable to MATLAB!

Thank you for that.

---

<div class="post-metadata">

**Author:** ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)\
**Post date:** [May 20, 2021, 7:55pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/19 "2021-05-20T19:55:04Z")

</div>

I’ve just tried this. The colour cycling is fine (thanks!) but heatmaps are now blank. I have updated to Makie v0.13.1, GLMakie v0.3.0 (Windows 10).

---

<div class="post-metadata">

**Author:** ![cortner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cortner/32/204_2.png) [@cortner](https://discourse.julialang.org/u/cortner)\
**Post date:** [May 20, 2021, 9:01pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/20 "2021-05-20T21:01:40Z")

</div>

What is the current status on TTFP?

[Next page](https://discourse.julialang.org/t/ann-makie-v-0-13/61522.md?page=2)
