# \[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:** 14\
**Page:** 3

<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 10, 2021, 3:40pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/41 "2021-07-10T15:40:17Z")

</div>

duplicate of [Makie - Testing GLMakie with correct ReferenceTests - #2 by sdanisch](https://discourse.julialang.org/t/makie-testing-glmakie-with-correct-referencetests/64206/2)

---

<div class="post-metadata">

**Author:** ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Post date:** [October 5, 2021, 10:52am UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/42 "2021-10-05T10:52:05Z")

</div>

“Minimal code changes necessary” — this whole restructuring broke almost every line of my mesh-animation code…

---

<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:** [October 5, 2021, 12:02pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/43 "2021-10-05T12:02:41Z")

</div>

Can you share what you’ve run into?  
I don’t think we made any big changes, besides the big Vec3f0 → Vec3f conversion, which should be easily fixable with the script from: [https://github.com/JuliaGeometry/GeometryBasics.jl/pull/97#issue-714149607](https://github.com/JuliaGeometry/GeometryBasics.jl/pull/97#issue-714149607)

---

<div class="post-metadata">

**Author:** ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Post date:** [October 5, 2021, 12:34pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/44 "2021-10-05T12:34:02Z")

</div>

It might be a later version (apparently v0.15 is the current one).

Anyway my old code is:

```julia
scene = Scene(
    show_axis = false,
    resolution = (1920, 1080)
)
camera(scene)
mesh!(
    Mesh(drop.mesh),
    #color = RGBAf0(0, 0, 1, 0.5),
    color = :blue,
    shading = true,
)
xs = -1.5:1e-2:1.5
r0 = center_of_mass(drop)
surface!(
    xs,
    xs,
    zeros(Float32, length(xs), length(xs)),
    color = [
        convert(
            RGBAf0,
            mycmap(90 / 360 * 2pi)
        ) for x in xs, y in xs
    ],
    shading = false
)
update_cam!(scene, cameracontrols(scene), Vec3f0(2.5, 0, 1), Vec3f0(0), Vec3f0(0, 0, 1))
scene |> display

record(
    scene,
    joinpath(trajectory.datapath, "anim3d.mp4"),
    -30:2:1000,
    framerate = 30
) do t
    i = findlast(<=(t), trajectory.times)
    i = isnothing(i) ? -1 : i
    t, (drop, subs) = trajectory[max(1, i)]
    r0 = center_of_mass(drop)
    scene.plots[1].input_args[1][] = Mesh(drop.mesh)
    if i > 0
        scene.plots[2][:color] = [
            convert(
                RGBAf0,
                target_angle(drop, subs, t, SVector(x, y, 0), r0) |> mycmap
            ) for x in xs, y in xs
        ]
    else
        scene.plots[2][:color] = [
            convert(
                RGBAf0,
                mycmap(90 / 360 * 2pi)
            ) for x in xs, y in xs
        ]
    end
end

```

I got it mostly working again like so:

```julia
#fig = Figure()
#ax = Axis3(fig, show_axis = false, resolution = (1920, 1080))
#cam = Camera3D(fig.scene)

fig, ax, drop_plot = mesh(
    Mesh(drop.mesh),
    #color = RGBAf0(0, 0, 1, 0.5),
    color = :blue,
    #colormap = (:white, :white),
    shading = false,
    figure = (resolution = (1920, 1080),),
    #lightposition = Vec3f0(0, 1, 2),
    #diffuse = Vec3f0(0.5, 0.5, 0.5),
    #ambient = Vec3f0(0.5,0.5,0.6),
    #shininess = 128f0,
)
xs = -1.5:1e-2:1.5
r0 = center_of_mass(drop)
subs_plot = surface!(
    xs,
    xs,
    zeros(Float32, length(xs), length(xs)),
    color = [
        convert(
            RGBAf0,
            mycmap(90 / 360 * 2pi)
        ) for x in xs, y in xs
    ],
    shading = false
)
scene = fig.scene
#update_cam!(scene, cam, Vec3f0(2.5, 0, 1), Vec3f0(0), Vec3f0(0, 0, 1))
#scene |> display
Makie.get_scene(fig) |> display

record(
    fig,
    joinpath(trajectory.datapath, "anim3d.mp4"),
    -120:10:2000,
    framerate = 30
) do t
    i = findlast(<=(t), trajectory.times)
    i = isnothing(i) ? -1 : i
    t, (drop, subs) = trajectory[max(1, i)]
    r0 = center_of_mass(drop)
    drop_plot.input_args[1][] = Mesh(drop.mesh)
    if i > 0
        subs_plot.color = [
            convert(
                RGBAf0,
                target_angle(drop, subs, t, SVector(x, y, 0), r0) |> mycmap
            ) for x in xs, y in xs
        ]
    else
        subs_plot.color = [
            convert(
                RGBAf0,
                mycmap(90 / 360 * 2pi)
            ) for x in xs, y in xs
        ]
    end
end

```

Notably, `update_camera` still doesnt work, and `Vec3f` is still `Vec3f0` for some reason.

---

<div class="post-metadata">

**Author:** ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Post date:** [October 5, 2021, 1:01pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/45 "2021-10-05T13:01:19Z")

</div>

My main gripe is that there is no backwards compatibility, and no obvious place to find what replaced what. It’s just trial and error after each update

---

<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:** [October 5, 2021, 1:21pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/46 "2021-10-05T13:21:44Z")

</div>

It looks like you skipped many major versions, from what I can tell…  
This is always a bit of a struggle.  
We also have become better at documenting breaking changes in NEWS.md + release notes and be more careful about deprecations - it’s still not perfect, but I’m pretty sure we had worse documentation for the versions you skipped.

---

<div class="post-metadata">

**Author:** ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Post date:** [October 5, 2021, 1:36pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/47 "2021-10-05T13:36:59Z")

</div>

Yes, that’s likely true. I avoided updating for a long time because I couldnt afford to break anything.

---

<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:** [October 5, 2021, 10:40pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/48 "2021-10-05T22:40:25Z")

</div>

What’s not working with the old code? `Scene` is still around and if you don’t need layouting or an axis it’s not a bad idea to use that.

For the second version you should be using

```julia
ax = LScene (fig[1, 1], scenekw = (show_axis = false, ))
...
cam = cameracontrols(ax.scene)
update_cam!(ax.scene, cam, ...) 

```

Axis3 doesn’t have a camera the way scene had and fig.scene is not the 3d scene you’re drawing to.

---

<div class="post-metadata">

**Author:** ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Post date:** [October 6, 2021, 6:55am UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/49 "2021-10-06T06:55:37Z")

</div>

> [@ffreyer](#):
>
> Axis3 doesn’t have a camera the way scene had and fig.scene is not the 3d scene you’re drawing to.

Thanks. That really begs the question though: Why isn’t `fig.scene` the scene that I’m drawing to? Where did I create a different scene?

---

<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:** [October 6, 2021, 7:13am UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/50 "2021-10-06T07:13:14Z")

</div>

The figure has its own top level scene with a PixelCamera which means all plot objects there are drawn in 2D, and a line from 0,0 to 100,0 is 100 pixels long. If you place an LScene in the Figure (which you only need because the normal Scene doesn’t have the infrastructure to connect to a layout) then you get a new child scene wrapped in there, accessible under `lscene.scene`, and for that you can manipulate the camera however you want. Axis3 is really only for that very specific 3D axis in a layout look.

---

<div class="post-metadata">

**Author:** ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Post date:** [October 6, 2021, 12:02pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/51 "2021-10-06T12:02:54Z")

</div>

I think was able to follow that. But I could not make your suggested camera code work and tbh it’s intensely all alienating. Why does the figure come with a PixelCamera that is effectively unusable? (rhetorical question) I think somewhere there needs to be a design document that explains how I’m actually supposed to interact with this labyrinthean system of Cameras, Figures, Scenes, Axes, Layout, etc. It’s impenetrable (even for someone who has already worked a lot with PyPlot and Plots.jl)

---

<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:** [October 6, 2021, 12:50pm UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/52 "2021-10-06T12:50:01Z")

</div>

Maybe it would be more goal oriented to open specific issues in the Makie repo or here in separate threads. Reviving an older topic such as this for voicing your frustration with the package doesn’t really lead to actionable improvements I fear. A lot of effort went into the documentation that explains the connection between the parts you have trouble with, so opening docs issues or PRs that relate to those specific points would be highly appreciated.

---

<div class="post-metadata">

**Author:** ![Xavier\_Gonzalez](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xavier_gonzalez/32/36033_2.png) [@Xavier\_Gonzalez](https://discourse.julialang.org/u/Xavier_Gonzalez)\
**Post date:** [August 20, 2022, 7:03am UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/53 "2022-08-20T07:03:55Z")

</div>

Right now I’m trying to make a heatmap using Makie, but the plots are upside down. How can I reverse the y-axis?

---

<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:** [August 20, 2022, 10:54am UTC](https://discourse.julialang.org/t/ann-makie-v-0-13/61522/54 "2022-08-20T10:54:52Z")

</div>

There’s an example of the different orientation options here [image](https://makie.juliaplots.org/stable/examples/plotting_functions/image/#examples)

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