Documenter generates inconsistent plots

An auto-generated plot in my package documentation is inconsistent across irrelevent commits.

The most recent build changed the image while the related commit is irrelevant. Both images are different from what I get locally.

I can’t tell from your links how the images differ. But presumably, this is an issue with Plots (?), not Documenter. It’s hard to tell what exactly you’re doing, but presumably Documenter simply generates a new image every time it builds the documentation. Plots probably makes few if any guarantees on being “stable”. I would expect the platform and e.g. the installed fonts to change the output in small ways. So I would say this is expected behavior

2 Likes

There are 3 different images. The local one, the old workflow-generated one and the new workflow-generated one. The local one is perfect. The old one chops a bit on the left and the new one is far off. The fonts are the same. The platform could affect the overall looking, but I suppose they should not give glitched results?

Seems like the local one in a PNG and the workflow-generated ones are SVG. So probably a different backend or different settings? Where are these plots actually being created in the documentation? (edit: never mind, found PseudostableRecurrences.jl/docs/src/examples.md at master · putianyi889/PseudostableRecurrences.jl · GitHub)

1 Like

I wonder if setting a backend explicitly would help here, or maybe DisplayAs (which becomes essential when you have Literate.jl examples).

But other than that, this might be something to open an issue for with Plots.jl, if you can nail it down a bit more.

1 Like

Also, you could try the solution provided here:

2 Likes

I can’t upload an SVG to the discourse, so I converted it to png.