Skip to content
Advertisement

Why can’t I see graphs created with the plotly library on GitHub?

When I see the visualization displayed with the help of plotly, I would like to save it in a *.png file, e.g. with the help of a screenshot, and then in the readme file put a link to this file so that the image is displayed in the description of the repository. This is an example of such a reference in a readme file:

<img src="https://github.com/OliverWisn/data_visualization/blob/master/squares_plot.png?raw=true"/>

However, the image does not display. The image from the Matplotlib library displays excellently. I readed that GitHub performs a static render and it doesn’t include the embedded HTML/JavaScript that makes up a plotly graph. I use python 3.7.9 and the Sublime Text 4. Or does anyone have an idea how to do it?

Advertisement

Answer

If you edit your README.md using GitHub’s online editor, you can just paste the image you want to display. The editor will take care of saving it and linking to it.

Alternatively, you can save it manually as part of your repository alongside the README.md and then reference it like this:

![Your Image Title](your_image_name.png)

See also the official guide.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement