# No figures generated after deploying with Documenter

**URL:** https://discourse.julialang.org/t/no-figures-generated-after-deploying-with-documenter/64242
**Category:** General Usage
**Tags:** documenter
**Created:** [July 7, 2021, 11:05pm UTC](https://discourse.julialang.org/t/no-figures-generated-after-deploying-with-documenter/64242 "2021-07-07T23:05:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![RaulDurand](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rauldurand/32/2044_2.png) [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)
#### Post date: [July 7, 2021, 11:05pm UTC](https://discourse.julialang.org/t/no-figures-generated-after-deploying-with-documenter/64242/1 "2021-07-07T23:05:01Z")

</div>

I am working on the documentation of an unregistered package ([GitHub - NumSoftware/Amaru.jl at gh-pages](https://github.com/NumSoftware/Amaru.jl/tree/gh-pages)).  
I have several examples in the markdown that generate figures using PyPlot. Then I deploy using Actions.  
On the Github page, the text content is just fine but there are no figures.  
I tried saving the figures in svg and png formats but no figure files appear in the gh-pages branch after deploying.  
Is it something related to PyPlot?  
I have no idea where the Github Actions log file is placed.  
Any help is appreciated.

---

<div class="post-metadata">

### Author: ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)
#### Post date: [July 7, 2021, 11:09pm UTC](https://discourse.julialang.org/t/no-figures-generated-after-deploying-with-documenter/64242/2 "2021-07-07T23:09:51Z")

</div>

I think you are running into this: [Displaying images via raw html is broken for hosted but not local docs · Issue #921 · JuliaDocs/Documenter.jl · GitHub](https://github.com/JuliaDocs/Documenter.jl/issues/921)

Couldn’t you let the images be rendered directly by the at-example block (i.e. having the plot object be the last thing in the at-example block)?

---

<div class="post-metadata">

### Author: ![RaulDurand](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rauldurand/32/2044_2.png) [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)
#### Post date: [July 7, 2021, 11:39pm UTC](https://discourse.julialang.org/t/no-figures-generated-after-deploying-with-documenter/64242/3 "2021-07-07T23:39:36Z")

</div>

@mortenpi, thanks for your comment.

The figures are generated locally as well as other files with no problems.  
All files appear in the gh-pages branch except the figures.

I’ll try to render the images at the end of the @example blocks.  
I started to suspect that PyPlot dependencies may not be fulfilled in the remote host.

---

<div class="post-metadata">

### Author: ![RaulDurand](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rauldurand/32/2044_2.png) [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)
#### Post date: [July 8, 2021, 4:54am UTC](https://discourse.julialang.org/t/no-figures-generated-after-deploying-with-documenter/64242/4 "2021-07-08T04:54:37Z")

</div>

> [@mortenpi](#):
>
> Couldn’t you let the images be rendered directly by the at-example block (i.e. having the plot object be the last thing in the at-example block)?

I tried that, It did not work.  
Checking the [Luxor.jl](https://github.com/JuliaGraphics/Luxor.jl/tree/gh-pages) and [ControlSystems.jl](https://github.com/JuliaControl/ControlSystems.jl/tree/gh-pages/dev) packages, they use different approaches to get the figures in the gh-pages branch and rendered in the final HTML. Luxor.jl uploads the figures directly to the assets/figures folder and ControlSystem runs all examples as doctests and apparently, the figures go to the gh-pages branch.

I am wondering why @example does not save figure files.

---

<div class="post-metadata">

### Author: ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)
#### Post date: [July 8, 2021, 5:38am UTC](https://discourse.julialang.org/t/no-figures-generated-after-deploying-with-documenter/64242/5 "2021-07-08T05:38:42Z")

</div>

Sorry, I think my initial guess was wrong. I think you simply [do not have `matplotlib` available on CI](https://github.com/NumSoftware/Amaru.jl/runs/3013709316#step:5:10), and so it’s failing to generate the PNGs?

And [#921](https://github.com/JuliaDocs/Documenter.jl/issues/921) would not affect you I think – we resolve those paths if I remember correctly (it’s only an issue if you use at-raw blocks).

---

<div class="post-metadata">

### Author: ![RaulDurand](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rauldurand/32/2044_2.png) [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)
#### Post date: [July 8, 2021, 4:47pm UTC](https://discourse.julialang.org/t/no-figures-generated-after-deploying-with-documenter/64242/6 "2021-07-08T16:47:16Z")

</div>

Thanks a lot for pointing this. I Fixed CI.yml to include Python dependencies. Now, the figures are [rendered](https://numsoftware.github.io/Amaru.jl/dev/tutorial/tutorial/) alright.
