# \[ANN\] Makie.jl 0.15

**URL:** <https://discourse.julialang.org/t/ann-makie-jl-0-15/64704>\
**Category:** Package Announcements\
**Tags:** plotting, makie\
**Created:** [July 15, 2021, 4:50pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704 "2021-07-15T16:50:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [July 15, 2021, 4:50pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/1 "2021-07-15T16:50:53Z")

</div>

I’m happy to announce a new, minor Makie version!

The main breaking change is described in this [PR](https://github.com/JuliaPlots/Makie.jl/pull/1075).

You can find all the other important changes in the [NEWS.md](https://makie.juliaplots.org/stable/news.html).

The most exciting feature surely is the much improved LaTex support, thanks to @Kolaru @jules:

```julia
using CairoMakie

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

lines!(0..10, x -> sin(3x) / (cos(x) + 2),
    label = L"\frac{\sin(3x)}{\cos(x) + 2}")
lines!(0..10, x -> sin(x^2) / (cos(sqrt(x)) + 2),
    label = L"\frac{\sin(x^2)}{\cos(\sqrt{x}) + 2}")

Legend(f[1, 2], ax)

f

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/a/8a2e93c69e865a7ebbb2fa98a48f49785a6cbdca.png)

The LaTeX string gets parsed into a glyph layout by [MathTexEngine.jl](https://github.com/Kolaru/MathTeXEngine.jl), which doesn’t need a LaTeX install and makes it fast, fully interactive and one can can use LaTeX strings anywhere, where strings are used:

```julia
using GLMakie
lines(0..25, x -> 4 * sin(x) / (cos(3x) + 4), figure = (fontsize = 25,),
    axis = (
        xticks = (0:10:20, [L"10^{-3.5}", L"10^{-4.5}", L"10^{-5.5}"]),
        yticks = ([-1, 0, 1], [L"\sum_%$i{xy}" for i in 1:3]),
        yticklabelrotation = pi/8,
        title = L"\int_0^1{x^2}",
        xlabel = L"\sum_k{x_k ⋅ y_k}",
        ylabel = L"\int_a^b{\sqrt{abx}}"
    ),
)

```

![latex2](https://global.discourse-cdn.com/julialang/original/3X/9/f/9fe453312df7f31c45be6f6039a3f1bcfae7ef6f.gif)

Another big update is the major rework of the 3D camera by @ffreyer, which hopefully fixes quite a few quirks that came with using `LScene`:  
[http://makie.juliaplots.org/stable/cameras.html#Makie.Camera3D](http://makie.juliaplots.org/stable/cameras.html#Makie.Camera3D)

Finally, @t-bltg fixed the volume slice recipe and gave it some [docs](http://makie.juliaplots.org/stable/plotting_functions/volumeslices.html), which only made it into the NEWS.md after we tagged the release (😅 ):  
 ![volumeslices](https://global.discourse-cdn.com/julialang/original/3X/f/f/ff5b734f1e488dc9620bdead08f4197f59ce42a7.gif)

I hope everyone has a smooth upgrade and fun with the new features!  
If you encounter any issues, please [report them here](https://github.com/JuliaPlots/Makie.jl/issues/new).

Best,  
Simon

---

<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:** [July 15, 2021, 5:01pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/2 "2021-07-15T17:01:06Z")

</div>

Minor? I would say major! Congrats! I’m completly sold obviously with the Latex Support. Here my [first example](https://lazarusa.github.io/BeautifulMakie/ScattersLines/latexSample/). So far, everything just works!

![latexSample](https://global.discourse-cdn.com/julialang/original/3X/1/c/1cf497ef91b87bbf8431cd7a38e03cd7d10b82ec.png)

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [July 15, 2021, 5:04pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/3 "2021-07-15T17:04:31Z")

</div>

> Minor?

Well, we’re still caught in pre 1.0 times 😉

Buhut, there is actually real progress towards 1.0 happening:

> <https://github.com/MakieOrg/Makie.jl/pull/1085>
>
> This is a pretty big rewrite of the internal plot type.
> The goal to not be brea…king, though! This is a stretch goal, and quite a few things will likely be slightly breaking. One should think of this PR as Makie's 0.7 Julia version, on it's way to a breaking 1.0 release. This refactor will introduce warnings for features we want to deprecate, and will lay the groundwork to do the actual breaking changes.
> 
> The planned changes:
> \- each atomic plot type now has a fixed set of fields with fixed types. This enables:
> \* good error messages for wrong plot attributes (still need to add that bit in the current implementation)
> \* compilation time improvements (!?)
> \* types become self documenting
> \* better API for backends. Right now, it's pretty fuzzy to see what the basic plot types support, leading to bugs + making it more difficult to write new backends/maintain them
> \* merging themes can be a clean operation. Right now it's a big mess where it happens, how and when. With the new plot type, all fields not set by a user are put into a set of \`uninitilized\_fields\`, and then get updated from the theme when actually drawn 
> \- make it possible to construct a plot type without a scene. This enables
> \* constructing plots, taking their boundingbox etc, without plotting anything
> \* easier and cleaner adding & removing of plots from scenes. Right now it's possible, but unclean since the plot type still keeps some connections to the original parent
> \* reactive API: one can build whole scene graphs of plots without the need of a parent scene, and can construct them cheaply in an animation loop, without the whole overhead of building the whole scene. This also makes diffing of scene graphs easier (also because of the above)
>    
> \- revamp of observables inside plot types
> \* plot types are now mutable with concrete values as fields. Any \`setfield!\` operation will immediately converted the values to the strict field types
> \* remove the \`Attributes\` type, which was storing any plot attribute as \`Observable{Any}\`
> \* each plot object has an \`on\_event\` observable, which one can use to register to \`setfield!\` events, or other events like mouse/camera/axis-limit-changes
> \* non observable workflows become first class, since the creation of a plot type without any observable doesn't create any new observables, while one can still subscribe to attributes updating via \`setfield!\`
> \* no duplicate \`convert\_attribute\` calls in multiple parts of the pipelines. In the old infrastructure, everything got converted lazily, so there wasn't a clear point to convert.. Some some recipe did already apply conversions, and the backend then applied conversions again
> \* enables updating multiple attributes together, fixing the age old \[problems with synchronous updates\](http://makie.juliaplots.org/stable/interaction/nodes.html#Problems-With-Synchronous-Updates). Related https://github.com/JuliaPlots/Makie.jl/issues/798
>   
> \- conversion pipeline in plot constructor
> \* clear point where the conversion happens
> \* Enables to have e.g. \`Scatter(1:4)\` to create the correct plot object, without a scene present
> \* makes it possible to create plot instances very early, making it easier in the rest of the pipeline to e.g. calculate boundingboxes earlier
> 
> Timeline:
> 
> \- \[x\] create plot type + macro to create them
> \- \[x\] implement observable free updates
> \- \[x\] new attribute conversion pipeline
> \- \[x\] implement alpha attribute
> \- \[\] throw great error messages on unsupported attributes  
> \- \[\] clean up & document attributes part of every plot object (label, participate\_in\_limits, anti-aliasing, color, alpha, ..and more?) 
> \- \[\] start replacing basic plot types
> - \[\] Scatter (GLMakie working with basic attributes)
> - \[\] Lines (GLMakie works) 
> - \[\] LineSegments (GLMakie works)
> - \[\] Mesh
> - \[\] Surface
> - \[\] Volume
> - \[\] Heatmap
> - \[\] Image
> \- \[\] figure out recipe pipeline with new conversion infrastructure (started)
> \- \[\] Fix all regressions as gracefully as possible

---

<div class="post-metadata">

**Author:** ![Tomas\_Pevny](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomas_pevny/32/25466_2.png) [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Post date:** [July 15, 2021, 6:43pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/4 "2021-07-15T18:43:57Z")

</div>

I am impressed by a sheer beauty of your plots.

---

<div class="post-metadata">

**Author:** ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Post date:** [July 15, 2021, 7:05pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/5 "2021-07-15T19:05:34Z")

</div>

Congrats guys on a really nice “minor” 😂 release. The LaTeX support is awesome. Coming from a ggplot2 kind of world it’s a pleasure to use Make for scientific plotting. Well done all who contributed. 💪🏻

---

<div class="post-metadata">

**Author:** ![bvrb](https://avatars.discourse-cdn.com/v4/letter/b/76d3ee/32.png) [@bvrb](https://discourse.julialang.org/u/bvrb)\
**Post date:** [July 15, 2021, 7:53pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/6 "2021-07-15T19:53:50Z")

</div>

This is fantastic! I have recently decided to give Julia a serious try after using it on and off for some time. Among others, I have some visualization projects in mind that are sort of math-related, so the LaTeX support will come in very handy.

Also love the volume slice plot. Although I didn’t know until now I needed something like that, I think I might have some use for that as well 🤔

---

<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:** [July 15, 2021, 8:46pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/7 "2021-07-15T20:46:55Z")

</div>

@sdanisch, thank you for the good stuff.

Two questions if you will:

- Does the DataInspector work on the volume slices displayed above? Tried it but it seems to show only two coordinates + one data value?
- Where can one find the list of Makie key bindings for 3D zooming, panning, resetting the zoom, etc.?

---

<div class="post-metadata">

**Author:** ![icweaver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/icweaver/32/45764_2.png) [@icweaver](https://discourse.julialang.org/u/icweaver)\
**Post date:** [July 16, 2021, 1:20am UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/8 "2021-07-16T01:20:40Z")

</div>

This is seriously cool, thanks for all of your work! I think I am running into a quick issue with the latex string in the first example. Adding an axis label with `ax = Axis(f[1, 1], xlabel=L"\theta")` works great, but for some reason trying:

```julia
ax.xlabel = L"\theta"

```

instead seems to only display `$\theta$`. Is this intended?

---

<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:** [July 16, 2021, 6:12am UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/9 "2021-07-16T06:12:38Z")

</div>

This is a limitation currently, if the label is a string at initialization, then the input observable of the underlying Text is parameterized String so a LatexString is just converted later.

---

<div class="post-metadata">

**Author:** ![mcarpe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcarpe/32/2719_2.png) [@mcarpe](https://discourse.julialang.org/u/mcarpe)\
**Post date:** [July 16, 2021, 12:53pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/10 "2021-07-16T12:53:33Z")

</div>

Agreed… as far as I’m concerned, between LaTeX support and Algebra of Graphics I have now no reasons to use any other plotting package…

Well done!

---

<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:** [July 16, 2021, 2:13pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/11 "2021-07-16T14:13:12Z")

</div>

> Does the DataInspector work on the volume slices displayed above? Tried it but it seems to show only two coordinates + one data value?

There is no specialization for volumeslices so it’ll fall back onto whatever primitive plot is used, which are heatmaps. ~~It should be giving you two of (x, y, z) and the data value, which isn’t super useful I guess?~~ Nvm, the heatmap inspection assumes 2D so it should be unusable.

> Where can one find the list of Makie key bindings for 3D zooming, panning, resetting the zoom, etc.?

For a 3D camera in an LScene you can check `?Camera3D`. The same docstring is also in the docs [here](http://makie.juliaplots.org/stable/cameras.html).

---

<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:** [July 16, 2021, 2:47pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/12 "2021-07-16T14:47:36Z")

</div>

@ffreyer, thank you for the info on the cam3d key bindings, the controls are not intuitive (to me) and the 3D view seems very hard to tame.

Regarding the DataInspector, it would be useful at least to get the property values at the cursor point. When hovering the cursor over the bounding 3D box we get proper (x,y,z) coordinates.

---

<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:** [July 16, 2021, 3:41pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/13 "2021-07-16T15:41:33Z")

</div>

> the controls are not intuitive (to me) and the 3D view seems very hard to tame.

I think that’s just kind of a general thing. You have 3 rotation axes, 3 translation directions and zooming, each going two ways - that’s a lot to deal with. The mouse controls should be mostly the same as before, with the exception that zooming now uses fov instead squeezing the view box (which causes clipping issues). I feel like it’s easier to get lost with that, so I’m not sure if it was a good change…

The keyboard controls are all new and allow you some things you couldn’t do before, i.e. rotating the screen with q/e and moving in and out with w/s. Another new thing here is fixing of rotation/translation axes with x/y/z which should be helpful taming things.

You might also find it easier to use `Camera3D(lscene.scene)`, which changes some defaults. (No fixed z axis, no translation during zooming)

---

<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:** [July 16, 2021, 3:47pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/14 "2021-07-16T15:47:59Z")

</div>

Thanks.  
For whatever it is worth, [this online 3D viewer](https://3dviewer.net/index.html#model=assets/models/solids.obj,assets/models/solids.mtl) provides a more intuitive zooming using the mouse and keyboard (could not find a better example right now).

---

<div class="post-metadata">

**Author:** ![icweaver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/icweaver/32/45764_2.png) [@icweaver](https://discourse.julialang.org/u/icweaver)\
**Post date:** [July 16, 2021, 4:39pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/15 "2021-07-16T16:39:53Z")

</div>

Ah, I see. Thanks for the quick response!

---

<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:** [July 16, 2021, 5:25pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/16 "2021-07-16T17:25:52Z")

</div>

When installing `Makie` here, I keep getting the `0.13.14` version. What may be holding me back?

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [July 16, 2021, 5:26pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/17 "2021-07-16T17:26:20Z")

</div>

Try `]add Makie@0.15` to find out 😉

---

<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:** [July 16, 2021, 5:31pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/18 "2021-07-16T17:31:54Z")

</div>

Thanks, it was `FloatingTableView.jl`. I reported the issue in their repo.

edit: Now, if I run this example:

```julia
using CairoMakie

x = range(0, 10, length=100)
y1 = sin.(x)
y2 = cos.(x)

scatter(x, y1, color = :red, markersize = range(5, 15, length=100))
sc = scatter!(x, y2, color = range(0, 1, length=100), colormap = :thermal)

current_figure()

```

Instead of getting a plot I get:

```julia
julia> current_figure()
Scene (800px, 600px):
  18 Plots:
    ├ Combined{Makie.poly, Tuple{Vector{Vector{Point{2, Float32}}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ MakieCore.Text{Tuple{String}}
    ├ Lines{Tuple{Vector{Point{2, Float32}}}}
    ├ MakieCore.Text{Tuple{Vector{Tuple{AbstractString, Point{2, Float32}}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ MakieCore.Text{Tuple{String}}
    ├ Lines{Tuple{Vector{Point{2, Float32}}}}
    ├ MakieCore.Text{Tuple{Vector{Tuple{AbstractString, Point{2, Float32}}}}}
    ├ Lines{Tuple{Vector{Point{2, Float32}}}}
    ├ Lines{Tuple{Vector{Point{2, Float32}}}}
    └ MakieCore.Text{Tuple{String}}
  1 Child Scene:
    └ Scene (728px, 541px)

```

Any idea on what may be wrong here?

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [July 16, 2021, 5:53pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/19 "2021-07-16T17:53:36Z")

</div>

For CairoMakie, you need to have an active display system that can show images, e.g. VSCode with active plotpane, or Pluto.  
Otherwise, you’ll need to use `save("test.png", current_figure())`

---

<div class="post-metadata">

**Author:** ![sunbubble](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sunbubble/32/22022_2.png) [@sunbubble](https://discourse.julialang.org/u/sunbubble)\
**Post date:** [July 17, 2021, 1:35pm UTC](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704/20 "2021-07-17T13:35:07Z")

</div>

I’m also struggling with the new 3D camera controls. Particularly the zoom on a Mac touchpad. I know from experience that creating intuitive 3D camera controls is very challenging, and there is no one size fits all solution. This is why 3D editing programs often have multiple camera control modes that you can select from.

For touch interfaces, I really like ArcBall style controls, the cursor position and the screen projected ball position move together. I guess you can copy the threeJS implementation. It’s demoed here [Arcball Control for threejs - YouTube](https://www.youtube.com/watch?v=bZcJnb1qEa8).

Regarding the keyboard navigation, that’s really cool. Is there a way to also map the more standard arrow keys in addition to the WASD controls. I think non-gamers might simply not realise that keyboard navigation is possible.

[Next page](https://discourse.julialang.org/t/ann-makie-jl-0-15/64704.md?page=2)
