Skip to content

Commit

Permalink
transparent bg for generated images
Browse files Browse the repository at this point in the history
  • Loading branch information
tfiers committed Dec 25, 2022
1 parent a034376 commit 7382103
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Possible categories:

`{to backfill}`
- Removed `Pkg` dependency
- Transparent background for generated images (instead of solid white)

[diff-unreleased]: https://github.com/tfiers/PkgGraph.jl/compare/v0.1...HEAD

Expand Down
Binary file modified docs/img/Unitful-deps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 14 additions & 15 deletions docs/img/Unitful-deps.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/dot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Create the dependency graph of `pkgname` and render it as a Graphviz DOT string.
Example output (truncated), for `"Unitful"`:
```
digraph {
node [fontname = "sans-serif"]
bgcolor = "transparent"
node [fontname = "sans-serif", style = "filled", fillcolor = "white"]
edge [arrowsize = 0.88]
Unitful -> ConstructionBase
ConstructionBase -> LinearAlgebra
Expand Down Expand Up @@ -71,6 +72,7 @@ See [Graphviz Attributes](https://graphviz.org/doc/info/attrs.html) for more inf
graphs can be styled.
"""
const style = [
"node [fontname = \"sans-serif\"]",
"bgcolor = \"transparent\"",
"node [fontname = \"sans-serif\", style = \"filled\", fillcolor = \"white\"]",
"edge [arrowsize = 0.88]",
]

1 comment on commit 7382103

@tfiers
Copy link
Owner Author

@tfiers tfiers commented on 7382103 Dec 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes #23

Please sign in to comment.