# Saving heatmap as pdf resolution

**URL:** https://discourse.julialang.org/t/saving-heatmap-as-pdf-resolution/100499
**Category:** General Usage
**Tags:** question, plotting
**Created:** [June 17, 2023, 9:07pm UTC](https://discourse.julialang.org/t/saving-heatmap-as-pdf-resolution/100499 "2023-06-17T21:07:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Peter\_Uhl1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/peter_uhl1/32/48094_2.png) [@Peter\_Uhl1](https://discourse.julialang.org/u/Peter_Uhl1)
#### Post date: [June 17, 2023, 9:07pm UTC](https://discourse.julialang.org/t/saving-heatmap-as-pdf-resolution/100499/1 "2023-06-17T21:07:16Z")

</div>

I’m trying to save a simple 100x100 heatmap as a pdf. When I do, the heatmap ends up looking blurry in the saved image. Just doing

```julia
heatmap(rand(100,100))
savefig("stuff.pdf")

```

saves a pdf with the axis labels, colorbar, etc looking fine but the heatmap itself blurry. Doing `savefig("stuff.png")` also turns out fine, but I need it as a vectorized image.

Hoping this is a quick fix, thanks in advance.

---

<div class="post-metadata">

### Author: ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)
#### Post date: [June 17, 2023, 10:43pm UTC](https://discourse.julialang.org/t/saving-heatmap-as-pdf-resolution/100499/2 "2023-06-17T22:43:08Z")

</div>

This often has to do with the backend plotting package; do you know which one you are using? Potentially GR that is the usual default that comes with Plots.jl?

---

<div class="post-metadata">

### Author: ![Peter\_Uhl1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/peter_uhl1/32/48094_2.png) [@Peter\_Uhl1](https://discourse.julialang.org/u/Peter_Uhl1)
#### Post date: [June 17, 2023, 10:49pm UTC](https://discourse.julialang.org/t/saving-heatmap-as-pdf-resolution/100499/3 "2023-06-17T22:49:54Z")

</div>

gr() but I’ve also tried plotlyjs()

---

<div class="post-metadata">

### Author: ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)
#### Post date: [June 17, 2023, 10:53pm UTC](https://discourse.julialang.org/t/saving-heatmap-as-pdf-resolution/100499/4 "2023-06-17T22:53:03Z")

</div>

You might try pgfplotsx ?

---

<div class="post-metadata">

### Author: ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)
#### Post date: [June 19, 2023, 7:50am UTC](https://discourse.julialang.org/t/saving-heatmap-as-pdf-resolution/100499/5 "2023-06-19T07:50:40Z")

</div>

It depends on which PDF viewer you use to view the result. With Acrobat Reader the heatmap (internally handled as an image) should **not** be interpolated.
