# Plots do not display, unless I call gui(), when using custom sysimage

**URL:** <https://discourse.julialang.org/t/plots-do-not-display-unless-i-call-gui-when-using-custom-sysimage/92207>\
**Category:** General Usage\
**Tags:** plots, sysimage\
**Created:** [December 28, 2022, 1:36am UTC](https://discourse.julialang.org/t/plots-do-not-display-unless-i-call-gui-when-using-custom-sysimage/92207 "2022-12-28T01:36:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rdiaz02](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@rdiaz02](https://discourse.julialang.org/u/rdiaz02)\
**Post date:** [December 28, 2022, 5:16pm UTC](https://discourse.julialang.org/t/plots-do-not-display-unless-i-call-gui-when-using-custom-sysimage/92207/2 "2022-12-28T17:16:11Z")

</div>

Answering my own question, an analogous to what has to be done with Makie ([Makie doesn't display plot when using a custom Julia sysimage](https://discourse.julialang.org/t/makie-doesnt-display-plot-when-using-a-custom-julia-sysimage/38515)), one can solve this by running `Plots. __init__ ()` after loading Plots.

(In addition it seems also that if the sysimage contains IJulia, the above will not work, nor will `gui` nor `plot(p, show = true)`; I think this makes sense, but I had a couple of sysimages that, accidentally, included IJulia).

I’ve made a pull request suggesting the use of `Plots. __init__ ()` in the example in [Creating a sysimage for fast plotting with Plots.jl · PackageCompiler](https://julialang.github.io/PackageCompiler.jl/dev/examples/plots.html).

---

_[View the full topic](https://discourse.julialang.org/t/plots-do-not-display-unless-i-call-gui-when-using-custom-sysimage/92207)._
