pygraphds 0.1.2__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pygraphds-0.1.2/src/pygraphds.egg-info → pygraphds-0.1.3}/PKG-INFO +1 -1
- {pygraphds-0.1.2 → pygraphds-0.1.3}/pyproject.toml +1 -1
- {pygraphds-0.1.2 → pygraphds-0.1.3}/src/pygraphds/_version.py +1 -1
- {pygraphds-0.1.2 → pygraphds-0.1.3}/src/pygraphds/graph.py +5 -7
- {pygraphds-0.1.2 → pygraphds-0.1.3/src/pygraphds.egg-info}/PKG-INFO +1 -1
- {pygraphds-0.1.2 → pygraphds-0.1.3}/LICENSE +0 -0
- {pygraphds-0.1.2 → pygraphds-0.1.3}/README.md +0 -0
- {pygraphds-0.1.2 → pygraphds-0.1.3}/setup.cfg +0 -0
- {pygraphds-0.1.2 → pygraphds-0.1.3}/src/pygraphds/__init__.py +0 -0
- {pygraphds-0.1.2 → pygraphds-0.1.3}/src/pygraphds.egg-info/SOURCES.txt +0 -0
- {pygraphds-0.1.2 → pygraphds-0.1.3}/src/pygraphds.egg-info/dependency_links.txt +0 -0
- {pygraphds-0.1.2 → pygraphds-0.1.3}/src/pygraphds.egg-info/requires.txt +0 -0
- {pygraphds-0.1.2 → pygraphds-0.1.3}/src/pygraphds.egg-info/top_level.txt +0 -0
- {pygraphds-0.1.2 → pygraphds-0.1.3}/tests/test_graph.py +0 -0
|
@@ -335,7 +335,8 @@ class Graph:
|
|
|
335
335
|
|
|
336
336
|
``crossing`` chooses the mark where differently directed edge strokes
|
|
337
337
|
meet: ``"x"`` (default), ``"+"``, or ``""`` for a blank. Nodes are
|
|
338
|
-
placed in a five
|
|
338
|
+
placed in a compact grid with at most five columns; edge strokes are
|
|
339
|
+
drawn behind labels.
|
|
339
340
|
"""
|
|
340
341
|
if crossing != "" and crossing != "+" and crossing != "x":
|
|
341
342
|
raise ValueError('crossing must be "", "+", or "x"')
|
|
@@ -352,7 +353,7 @@ class Graph:
|
|
|
352
353
|
)
|
|
353
354
|
labels[name] = "[" + visible_name + "]"
|
|
354
355
|
widest_label = max(len(label) for label in labels.values())
|
|
355
|
-
column_count = min(5, len(names))
|
|
356
|
+
column_count = min(5, math.ceil(len(names) / 2))
|
|
356
357
|
column_spacing = max(8, widest_label + 3)
|
|
357
358
|
row_spacing = 4
|
|
358
359
|
positions: dict[str, list[int]] = {}
|
|
@@ -381,10 +382,7 @@ class Graph:
|
|
|
381
382
|
else:
|
|
382
383
|
stroke = "/"
|
|
383
384
|
|
|
384
|
-
|
|
385
|
-
step_count = abs(dy)
|
|
386
|
-
else:
|
|
387
|
-
step_count = max(abs(dx), abs(dy))
|
|
385
|
+
step_count = max(abs(dx), abs(dy))
|
|
388
386
|
for step in range(1, step_count):
|
|
389
387
|
x = round(x1 + dx * step / step_count)
|
|
390
388
|
y = round(y1 + dy * step / step_count)
|
|
@@ -476,7 +474,7 @@ class Graph:
|
|
|
476
474
|
name,
|
|
477
475
|
ha="center",
|
|
478
476
|
va="center",
|
|
479
|
-
fontsize=
|
|
477
|
+
fontsize=11.25,
|
|
480
478
|
color="#172554",
|
|
481
479
|
zorder=3,
|
|
482
480
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|