graspgraph
Create easy-to-understand graphs
Concept
Make it easier to understand with graphs
Stats
Database ER diagram-like
Pivot table
What is possible
statsgraph
- Graphing statistics
dbergraph
- Graphing database table definition information
pivotgraph
- Graphing a pivot table
Reason for development
- I want to make things that are difficult to understand through text alone easier to understand by creating graphs
Versions
| Version | Summary |
|---|---|
| 0.3.4 | Add pivotgraph |
| 0.2.5 | Refactoring |
| 0.2.4 | Add dbergraph |
| 0.1.0 | Release graspgraph(statsgraph) |
Installation
graspgraph
pip install graspgraph
Graphviz
Required for PDF output
Poppler
Required for PDF image conversion
Usage
statsgraph
import graspgraph as gg
statsgraph = gg.Statsgraph(
gg.StatsgraphAxis([1, 2, 3, 4, 5]),
gg.StatsgraphAxis([11, 12, 13, 14, 15]),
gg.FigureColors(line = "blue"))
figure = statsgraph.to_figure()
figure.LayoutTitleText = "<b>[statsgraph]<br>タイトル</b>"
figure.XTitleText = "X軸"
figure.YTitleText = "Y軸"
figure.Write("./statsgraph.png")
dbergraph
import graspgraph as gg
prefix = "./database"
dbergraph = gg.Dbergraph(gg.Database.from_file_path(gg.Path.join(prefix, "yaml")))
dbergraph.Database.update()
dot = dbergraph.to_dot()
dot.TitleText = "<b>[dbergraph]</b>"
pdfFilePath = gg.Path.join(prefix, "pdf")
pngFilePath = gg.Path.join(prefix, "png")
dot.Write(pdfFilePath)
gg.Pdf.convert(pdfFilePath, pngFilePath)
pivotgraph
import graspgraph as gg
pivotTable = gg.PivotTable.from_array([
["", "収入", "支出", "利益"],
["1月", 1, 2, 3],
["2月", -1, -2.5, -2],
["3月", 0, -0.5, 1],
])
pivotgraph = gg.Pivotgraph(gg.PivotgraphAxis(pivotTable, gg.FigureTick(2)), gg.PivotgraphColors(bars = ["blue", "red", "green"]))
figure = pivotgraph.to_figure()
figure.LayoutTitleText = "<b>[pivotgraph]</b>"
figure.XTitleText = "金額(百万円)"
figure.YTitleText = "月次"
figure.Write("./images/pivot/usage.png")
CLI
pdf.convert
Convert PDF to image
1. Image(PNG) conversion by CLI execution
pdf.convert # <pdf file path> <image file path>
graspgraph pdf.convert graph.pdf graph.png
graph.png is done.
Release files for graspgraph 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| graspgraph-0.3.4.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| graspgraph-0.3.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.7 kB
Release files / graspgraph-0.3.4.tar.gz
| Download URL | graspgraph-0.3.4.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7adc0bb30c6107c10e5b0512cd802b4f5a2ff523b94b7d5c3b202d603c0183f
|
|
BLAKE2b-256 checksum How to use checksums |
f0177c08feef07f8d667ba5f593ab686407021446ed5dc0b0e7a7b09a448a429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.0
|
Release files / graspgraph-0.3.4-py3-none-any.whl
| Download URL | graspgraph-0.3.4-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7782785961bccbefa2a6601e599df0d22266789c3dc20aaf6e312c6373038a05
|
|
BLAKE2b-256 checksum How to use checksums |
a7f714c2bef8f27be0fb374eabd32532782fd27f441185b869530707c15e9b66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.0
|