简体   繁体   English

为什么在 GitHub 上看不到使用 plotly 库创建的图表?

[英]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, eg 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.当我看到在 plotly 的帮助下显示的可视化时,我想将其保存在 *.png 文件中,例如借助屏幕截图,然后在自述文件中放置指向该文件的链接,以便图像显示在存储库的描述中。 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. Matplotlib 库中的图像显示出色。 I readed that GitHub performs a static render and it doesn't include the embedded HTML/JavaScript that makes up a plotly graph.我读到 GitHub 执行 static 渲染,它不包括构成 plotly 图的嵌入式 HTML/JavaScript。 I use python 3.7.9 and the Sublime Text 4. Or does anyone have an idea how to do it?我使用 python 3.7.9 和 Sublime Text 4。或者有人知道怎么做吗?

If you edit your README.md using GitHub's online editor, you can just paste the image you want to display.如果您使用 GitHub 的在线编辑器编辑您的 README.md,您只需粘贴您想要显示的图像。 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:或者,您可以将其手动保存为存储库的一部分,与 README.md 并列,然后像这样引用它:

![Your Image Title](your_image_name.png)

See also the official guide .另见官方指南

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM