# Savefig causes a flash on the display

**URL:** <https://discourse.julialang.org/t/savefig-causes-a-flash-on-the-display/56647>\
**Category:** Visualization\
**Tags:** plots\
**Created:** [March 7, 2021, 2:59am UTC](https://discourse.julialang.org/t/savefig-causes-a-flash-on-the-display/56647 "2021-03-07T02:59:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeePhillips](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leephillips/32/205514_2.png) [@LeePhillips](https://discourse.julialang.org/u/LeePhillips)\
**Post date:** [March 7, 2021, 2:59am UTC](https://discourse.julialang.org/t/savefig-causes-a-flash-on-the-display/56647/1 "2021-03-07T02:59:16Z")

</div>

Calling savefig(“file”) writes the file, and the plots are as expected. But every call causes the screen to flash. I believe the plot is momentarily displayed and the plot window removed before the file is written. Running a long program that creates many plots makes the machine unusable. Sometimes I also get errors written to the terminal:

read: Connection reset by peer  
send: Broken pipe

This happens with both Julia 1.5 and 1.6.0-rc1, on Ubuntu Linux. I put semicolons after all calls to plot and savefig. I don’t understand why savefig just doesn’t write to the file without trying to display a plot window.

---

<div class="post-metadata">

**Author:** ![LeePhillips](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leephillips/32/205514_2.png) [@LeePhillips](https://discourse.julialang.org/u/LeePhillips)\
**Post date:** [September 6, 2021, 2:08pm UTC](https://discourse.julialang.org/t/savefig-causes-a-flash-on-the-display/56647/2 "2021-09-06T14:08:54Z")

</div>

Replying to my own comment to say that recent versions of Plots no longer have this problem.

---

<div class="post-metadata">

**Author:** ![LeePhillips](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leephillips/32/205514_2.png) [@LeePhillips](https://discourse.julialang.org/u/LeePhillips)\
**Post date:** [January 30, 2026, 8:46pm UTC](https://discourse.julialang.org/t/savefig-causes-a-flash-on-the-display/56647/3 "2026-01-30T20:46:02Z")

</div>

Replying much later!

With Julia 1.12.4 and Plots v1.41.4 with the gr backend, `savefig();` pops up an unwanted plot on the display.
