# GLMakie output .pdf or .svg

**URL:** <https://discourse.julialang.org/t/glmakie-output-pdf-or-svg/127051>\
**Category:** General Usage\
**Tags:** plotting, save, glmakie\
**Created:** [March 17, 2025, 11:06am UTC](https://discourse.julialang.org/t/glmakie-output-pdf-or-svg/127051 "2025-03-17T11:06:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NaSi](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@NaSi](https://discourse.julialang.org/u/NaSi)\
**Post date:** [March 17, 2025, 11:06am UTC](https://discourse.julialang.org/t/glmakie-output-pdf-or-svg/127051/1 "2025-03-17T11:06:31Z")

</div>

Hello =)

I’m using GLMakie to create 3D plots. I’d like to save these plots as **.pdf** or **.svg** files to achieve better quality. When I save them as **.png** , the resolution isn’t high enough, especially when I zoom in on the axes.

Could you help me with this?

Thanks a lot,  
N.

---

<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:** [March 17, 2025, 11:10am UTC](https://discourse.julialang.org/t/glmakie-output-pdf-or-svg/127051/2 "2025-03-17T11:10:42Z")

</div>

To save pngs with higher resolution, do `save(...; px_per_unit = 4)` or whatever your desired factor is. This page explains how to set a specific dpi [How to match figure size, font sizes and dpi | Makie](https://docs.makie.org/stable/how-to/match-figure-size-font-sizes-and-dpi)

You can also save pdf or svg with `using CairoMakie; save(...; backend = CairoMakie)` but be aware that any mesh will cause rasterization of the vector graphic, which is likely if you’re making 3d plots. Vector graphics in general are not able to handle meshes or complex 3d compositions.
