本文簡要介紹 python 語言中 matplotlib.dviread.Dvi
的用法。
-
基礎:
object
一個 dvi ("device-independent") 文件的閱讀器,由 TeX 生成。
當前的實現隻能按順序遍曆頁麵,甚至不嘗試驗證後同步碼。
此類可用作上下文管理器,以在退出時關閉基礎文件。頁麵可以通過迭代讀取。這是一種在不嘗試檢測空格的情況下提取文本的過於簡單的方法:
>>> with matplotlib.dviread.Dvi('input.dvi', 72) as dvi: ... for page in dvi: ... print(''.join(chr(t.glyph) for t in page.text))
從名為
filename
的文件中讀取數據並將TeX 的內部單位轉換為每英寸dpi
的單位。dpi
隻設置單位,不限製分辨率。使用 None 返回 TeX 的內部單位。
用法
class matplotlib.dviread.Dvi(filename, dpi)
相關用法
- Python matplotlib DraggableBase用法及代碼示例
- Python matplotlib axvspan用法及代碼示例
- Python matplotlib Axes.get_legend_handles_labels用法及代碼示例
- Python matplotlib AbstractMovieWriter用法及代碼示例
- Python matplotlib triplot用法及代碼示例
- Python matplotlib StarPolygonCollection.set_hatch用法及代碼示例
- Python matplotlib Axes.hist用法及代碼示例
- Python matplotlib boxplot用法及代碼示例
- Python matplotlib subplots用法及代碼示例
- Python matplotlib InsetPosition用法及代碼示例
- Python matplotlib ToolManager.toolmanager_disconnect用法及代碼示例
- Python matplotlib Figure.set_size_inches用法及代碼示例
- Python matplotlib figlegend用法及代碼示例
- Python matplotlib Axes.step用法及代碼示例
- Python matplotlib Axes.contour用法及代碼示例
- Python matplotlib LassoSelector用法及代碼示例
- Python matplotlib BrokenBarHCollection.set_hatch用法及代碼示例
- Python matplotlib Axes.plot用法及代碼示例
- Python matplotlib Axes.semilogx用法及代碼示例
- Python matplotlib Axes.semilogy用法及代碼示例
- Python matplotlib MovieWriterRegistry.register用法及代碼示例
- Python matplotlib PolyQuadMesh.set_hatch用法及代碼示例
- Python matplotlib warn_deprecated用法及代碼示例
- Python matplotlib Text.set_bbox用法及代碼示例
- Python matplotlib Axes.inset_axes用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.dviread.Dvi。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。