draw nicer graph in svg format

This commit is contained in:
debris 2016-12-09 22:32:04 +01:00
parent 74ca4725ed
commit 78906f5594
6 changed files with 2535 additions and 2 deletions

View File

@ -7,7 +7,7 @@ The Parity Bitcoin client
![Graph][graph] ![Graph][graph]
[graph]: https://github.com/ethcore/parity-bitcoin/blob/master/tools/graph.png [graph]: https://github.com/ethcore/parity-bitcoin/blob/master/tools/graph.svg
[travis-image]: https://travis-ci.com/ethcore/parity-bitcoin.svg?token=DMFvZu71iaTbUYx9UypX&branch=master [travis-image]: https://travis-ci.com/ethcore/parity-bitcoin.svg?token=DMFvZu71iaTbUYx9UypX&branch=master
[travis-url]: https://travis-ci.com/ethcore/parity-bitcoin [travis-url]: https://travis-ci.com/ethcore/parity-bitcoin
[doc-url]: https://ethcore.github.io/parity-bitcoin/pbtc/index.html [doc-url]: https://ethcore.github.io/parity-bitcoin/pbtc/index.html

View File

@ -10,7 +10,11 @@ cargo update -p pbtc
# And draw dependencies graph using cargo graph # And draw dependencies graph using cargo graph
cargo graph --build-shape box --build-line-style dashed > tools/graph.dot cargo graph --build-shape box --build-line-style dashed > tools/graph.dot
dot -Tpng > tools/graph.png tools/graph.dot
# Let's fix graph ratio
patch tools/graph.dot tools/graph_ratio.diff
dot -Tsvg > tools/graph.svg tools/graph.dot
# Finally let's bring back old Cargo.toml file # Finally let's bring back old Cargo.toml file
patch Cargo.toml tools/workspace.diff patch Cargo.toml tools/workspace.diff

View File

@ -1,4 +1,5 @@
digraph dependencies { digraph dependencies {
ratio=1.0;
N0[label="pbtc",shape=box]; N0[label="pbtc",shape=box];
N1[label="app_dirs",shape=box]; N1[label="app_dirs",shape=box];
N2[label="bencher",shape=box]; N2[label="bencher",shape=box];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

2518
tools/graph.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 173 KiB

10
tools/graph_ratio.diff Normal file
View File

@ -0,0 +1,10 @@
diff --git tools/graph.dot tools/graph.dot
index f842267..1a831d2 100644
--- tools/graph.dot
+++ tools/graph.dot
@@ -1,4 +1,5 @@
digraph dependencies {
+ ratio=1.0;
N0[label="pbtc",shape=box];
N1[label="app_dirs",shape=box];
N2[label="bencher",shape=box];