diff options
author | Dima Pasechnik <dima@pasechnik.info> | 2023-01-17 13:38:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 05:38:37 -0800 |
commit | 6f50d397fb22fee79867e5bbdfc885e1247096d4 (patch) | |
tree | 8d59e0ea2a14f8155c64dcc1c16b9be5dd1429ad /networkx/drawing | |
parent | 3bfc78ba33e8a8394a43d730c01b374a7e80ace4 (diff) | |
download | networkx-6f50d397fb22fee79867e5bbdfc885e1247096d4.tar.gz |
provide tikz with degrees, not radians (#6360)
* provide tikz with degrees, not radians
* set default radius to 2
Diffstat (limited to 'networkx/drawing')
-rw-r--r-- | networkx/drawing/nx_latex.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networkx/drawing/nx_latex.py b/networkx/drawing/nx_latex.py index 0833bdc3..359d0ed1 100644 --- a/networkx/drawing/nx_latex.py +++ b/networkx/drawing/nx_latex.py @@ -217,8 +217,8 @@ def to_latex_raw( if not isinstance(pos, dict): pos = nx.get_node_attributes(G, pos) if not pos: - # circular layout with radius 1 - pos = {n: f"({round(2* 3.1415 * i / len(G), 3)}:10)" for i, n in enumerate(G)} + # circular layout with radius 2 + pos = {n: f"({round(360.0 * i / len(G), 3)}:2)" for i, n in enumerate(G)} for node in G: if node not in pos: raise nx.NetworkXError(f"node {node} has no specified pos {pos}") |