I have an issue with displaying plots with .ofig extension in markdown. Figures are located in assets
dir and I cannot display them in local preview nor when I push on GitHub.
Does anyone have any suggestions how can I achieve that or will I need to convert the plots in another format?
I have tried:
<img src="assets/SIR-figure-1.ofig" width="auto" height="auto" />
<img src="assets/SIR-figure-1" width="auto" height="auto" />
![plot](assets/SIR-figure-1.ofig)
![plot](./assets/SIR-figure-1.ofig)
None of them worked.
CodePudding user response:
GitHub renders Markdown to HTML, so you need to use an image format that web browsers know how to interpret.
Looking at the documentation, I can't tell what ofig
actually is but I'm fairly sure it's not browser-friendly. Save your plots as PNG or SVG files instead.
(JPEGs and GIFs would technically work, too, but are unlikely to be good choices here. Most plots will have lots of unsightly artifacts when saved as JPEGs, and unless you need animation PNG is pretty much a more modern GIF.)