# Saving VegaLite Plots

**URL:** https://discourse.julialang.org/t/saving-vegalite-plots/42575
**Category:** Visualization
**Created:** [July 5, 2020, 9:54pm UTC](https://discourse.julialang.org/t/saving-vegalite-plots/42575 "2020-07-05T21:54:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Chris\_Anderson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chris_anderson/32/9465_2.png) [@Chris\_Anderson](https://discourse.julialang.org/u/Chris_Anderson)
#### Post date: [July 5, 2020, 9:54pm UTC](https://discourse.julialang.org/t/saving-vegalite-plots/42575/1 "2020-07-05T21:54:22Z")

</div>

I’m having some trouble saving plots I’ve created using VegaLite. Here is what I’ve been trying.

`grph1 |> save("/PATH/figure.png")`

I get this error.

```julia
MethodError: no method matching save_(::FileIO.File{FileIO.DataFormat{:PNG}}, ::Nothing)
Closest candidates are:
  save_(::FileIO.File{R}, ::AbstractArray; permute_horizontal, mapi) where R<:FileIO.DataFormat at /Users/chand/.julia/packages/QuartzImageIO/AjiIs/src/QuartzImageIO.jl:223

```

I just need to save these plots in some way so I can add them to a document. Is there another way to do this? Thank you.

---

<div class="post-metadata">

### Author: ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)
#### Post date: [July 6, 2020, 7:12am UTC](https://discourse.julialang.org/t/saving-vegalite-plots/42575/2 "2020-07-06T07:12:59Z")

</div>

You may try if this works for you:

```julia
julia> using FileIO

julia> p |> FileIO.save("/PATH/figure.png")

```

---

<div class="post-metadata">

### Author: ![Chris\_Anderson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chris_anderson/32/9465_2.png) [@Chris\_Anderson](https://discourse.julialang.org/u/Chris_Anderson)
#### Post date: [July 7, 2020, 5:46pm UTC](https://discourse.julialang.org/t/saving-vegalite-plots/42575/3 "2020-07-07T17:46:11Z")

</div>

This works perfectly, thank you.
