Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
graph-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
43
Issues
43
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tiago Peixoto
graph-tool
Commits
772e31dd
Commit
772e31dd
authored
Jan 09, 2021
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graph_draw(): fix bug with drawing a single node
This fixes issue
#688
parent
31fafd57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/graph_tool/draw/cairo_draw.py
src/graph_tool/draw/cairo_draw.py
+5
-1
No files found.
src/graph_tool/draw/cairo_draw.py
View file @
772e31dd
...
...
@@ -1306,7 +1306,11 @@ def fit_to_view(rec, output_size, adjust_aspect=False, pad=.9):
else
:
output_size
[
1
]
=
int
(
round
(
float
(
output_size
[
0
]
*
h
/
w
)))
zoom
=
min
(
output_size
[
0
]
/
w
,
output_size
[
1
]
/
h
)
zoom
=
max
(
w
/
output_size
[
0
],
h
/
output_size
[
1
])
if
zoom
==
0
:
zoom
=
1
else
:
zoom
=
1
/
zoom
x
-=
(
output_size
[
0
]
/
zoom
-
w
)
/
2
y
-=
(
output_size
[
1
]
/
zoom
-
h
)
/
2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment