Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
26fdc3b7
Commit
26fdc3b7
authored
Oct 31, 2012
by
Tiago Peixoto
Browse files
Fix automatic text-color computation
parent
b55261c6
Changes
1
Show whitespace changes
Inline
Side-by-side
src/graph_tool/draw/cairo_draw.py
View file @
26fdc3b7
...
...
@@ -659,7 +659,8 @@ def graph_draw(g, pos=None, vprops=None, eprops=None, vorder=None, eorder=None,
if
"text"
in
vprops
and
(
"text_color"
not
in
vprops
or
vprops
[
"text_color"
]
==
"auto"
):
bg
=
vprops
.
get
(
"fill_color"
,
_vdefaults
[
"fill_color"
])
vcmap
=
kwargs
.
get
(
"vcmap"
,
matplotlib
.
cm
.
jet
)
bg
=
_convert
(
vertex_attrs
.
fill_color
,
vprops
.
get
(
"fill_color"
,
_vdefaults
[
"fill_color"
]),
vcmap
)
if
"bg_color"
in
kwargs
:
bg_color
=
kwargs
[
"bg_color"
]
else
:
...
...
@@ -668,7 +669,6 @@ def graph_draw(g, pos=None, vprops=None, eprops=None, vorder=None, eorder=None,
vprops
.
get
(
"text_position"
,
_vdefaults
[
"text_position"
]),
bg_color
)
print
(
vprops
[
"text_color"
])
if
output
is
None
:
return
interactive_window
(
g
,
pos
,
vprops
,
eprops
,
vorder
,
eorder
,
...
...
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