HTML生成器遵循您保存的图形的目录结构

fig-html的Python项目详细描述


概述

fig_html从保存图形的目录生成最小的html文件。

要求

python >= 3.6
numpy
pandas
matplotlib
jinja2 >= 2.10

matplotlib仅用于制作示例图形。

用法

假设我们将图形保存在目录层次结构中。

SampleFiguresMaker生成示例图和目录。

fromfig_html.utilsimportSampleFiguresMakerroot_dir="./outputs"SampleFiguresMaker().make(root_dir)
└── outputs
    ├── correlation
    │   ├── correlation
    │   │   ├── fig1.png
    │   │   ├── fig2.png
    │   │   └── fig3.png
    │   ├── fig1.png
    │   ├── fig2.png
    │   └── fig3.png
    └── histogram
        ├── histogram1.png
        ├── histogram2.png
        └── histogram3.png

HTMLMaker在下面的每个目录中添加html文件。

fromfig_htmlimportHTMLMakerroot_dir="./outputs"HTMLMaker().make(root_dir)
└── outputs
    ├── _static
    │   └── basestyle.css
    ├── correlation
    │   ├── correlation
    │   │   ├── correlation.html
    │   │   ├── fig1.png
    │   │   ├── fig2.png
    │   │   └── fig3.png
    │   ├── correlation.html
    │   ├── fig1.png
    │   ├── fig2.png
    │   └── fig3.png
    ├── histogram
    │   ├── histogram.html
    │   ├── histogram1.png
    │   ├── histogram2.png
    │   └── histogram3.png
    └── outputs.html

现在我们可以像这样轻松地核对数字了。

htmldemo

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java在安卓中为循环添加延迟,而不会暂停UI线程   java为什么接口没有一种方法要求实现类引用它们自己的类型?   ruby+appium或java+appium用于移动本机应用程序自动化   java我可以使用WeakHashMap而不是HashMap吗   java在字符串中查找常见的序列   java如何在不使用ArrayList的情况下从数组中删除对象?   java背景不会出现在添加的paintComponents()之后   java Swagger/OpenapiAnnotations:如何使用$ref生成allOf?   java如何使用AgendaCalendarView(开源)?   Java Crystal Report SDK报告和子报告   java如何制作包含构建编号的TeamCity工件?   java JMagick方法setGeometry of MontageInfo类崩溃JMV   java如何从wsdl创建独立应用程序?