bg_color parameter doesn't work in version 2.30
If graph_draw
is called with a bg_color
parameter, the following warning is printed and the background color remains transparent:
/usr/lib/python3/dist-packages/graph_tool/draw/cairo_draw.py:640: UserWarning: Unknown parameter: bg_color
warnings.warn("Unknown parameter: " + k, UserWarning)
This used to work in graph-tool 2.29. A regression test said:
c4c7e6750a29b874dcb5f8476558dd0d16a513f7 is the first bad commit
commit c4c7e6750a29b874dcb5f8476558dd0d16a513f7
Author: Tiago de Paula Peixoto <tiago@skewed.de>
Date: Sun Mar 22 11:56:53 2020 +0000
graph_draw(): revamp fit_view and matplotlib support
This fixes issues #628, #516, #461, #418, #280.
:040000 040000 06ebdee6068ca7cd55b7e9dd7ab99c8cd6a97ddb 16586513b513644af657dc426507316fc3260d7d M src
I'm betting that the relevant change in that commit is:
-
- if "bg_color" in kwargs:
- bg_color = kwargs["bg_color"]
- del kwargs["bg_color"]
- cr.set_source_rgba(bg_color[0], bg_color[1],
- bg_color[2], bg_color[3])
- cr.paint()