# Error saving plots in Makie

**URL:** <https://discourse.julialang.org/t/error-saving-plots-in-makie/83853>\
**Category:** New to Julia\
**Tags:** question, plotting\
**Created:** [July 6, 2022, 8:01pm UTC](https://discourse.julialang.org/t/error-saving-plots-in-makie/83853 "2022-07-06T20:01:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adi\_Rai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adi_rai/32/34413_2.png) [@Adi\_Rai](https://discourse.julialang.org/u/Adi_Rai)\
**Post date:** [July 6, 2022, 8:01pm UTC](https://discourse.julialang.org/t/error-saving-plots-in-makie/83853/1 "2022-07-06T20:01:48Z")

</div>

Hello Everyone,

I was trying to save my plot as png images using Makie.jl in a for loop which constantly updates the plot.

Here is my code snippet which saves the plot:

![image](https://global.discourse-cdn.com/julialang/original/3X/b/e/be18cae418ecad810ed00cb37bc377b9d349a82a.png)

where file\_no is the iterable variable in the for loop and changes value.

This is the error I get:

```julia
SystemError: opening file "Frame:\\ 1.png": Invalid argument

var"#systemerror#69"(::Nothing, ::typeof(systemerror), ::String, ::Int32)@error.jl:174
#systemerror#68@error.jl:173[inlined]
systemerror@error.jl:173[inlined]
var"#open#636"(::Bool, ::Nothing, ::Nothing, ::Nothing, ::Bool, ::Nothing, ::typeof(open), ::String)@iostream.jl:293
var"#open#637"(::Bool, ::typeof(open), ::String, ::String)@iostream.jl:355
open(::String, ::String)@iostream.jl:355
var"#open#355"(::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(open), ::Makie.var"#931#932"{Float64, Float64, DataType, Makie.Scene}, ::String, ::Vararg{String})@io.jl:328
open@io.jl:328[inlined]
#save#930@display.jl:241[inlined]
save(::FileIO.File{FileIO.DataFormat{:PNG}, String}, ::Makie.Figure)@display.jl:226
var"#save#929"(::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(FileIO.save), ::String, ::Makie.Figure)@display.jl:217
save(::String, ::Makie.Figure)@display.jl:217
top-level scope@Local: 133

```

  
I can't figure out the error, any help would be appreciated. Thanks.

---

<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 6, 2022, 8:06pm UTC](https://discourse.julialang.org/t/error-saving-plots-in-makie/83853/2 "2022-07-06T20:06:11Z")

</div>

I think a `:` in a filename is not allowed

---

<div class="post-metadata">

**Author:** ![Adi\_Rai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adi_rai/32/34413_2.png) [@Adi\_Rai](https://discourse.julialang.org/u/Adi_Rai)\
**Post date:** [July 6, 2022, 8:30pm UTC](https://discourse.julialang.org/t/error-saving-plots-in-makie/83853/3 "2022-07-06T20:30:00Z")

</div>

Hi again @jules

Thanks for the quick response. Removing ‘:’ in the filename fixed the error.

---

<div class="post-metadata">

**Author:** ![suavesito](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/suavesito/32/34386_2.png) [@suavesito](https://discourse.julialang.org/u/suavesito)\
**Post date:** [July 7, 2022, 2:35pm UTC](https://discourse.julialang.org/t/error-saving-plots-in-makie/83853/4 "2022-07-07T14:35:05Z")

</div>

In Windows; MacOs, Linux and more Unix like, does accept `:` as part of a filename. 🙂

(Not that I recomend using it. 😅 )
