Skip to content

Commit

Permalink
Merge 0f002a0 into b180908
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Nov 17, 2020
2 parents b180908 + 0f002a0 commit 6d05852
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion hvplot/networkx.py
Expand Up @@ -6,8 +6,10 @@

from bokeh.models import HoverTool
from holoviews import Graph, Labels, dim
from holoviews.core.options import Store
from holoviews.core.util import dimension_sanitizer
from holoviews.plotting.bokeh import GraphPlot, LabelsPlot
from holoviews.plotting.bokeh.styles import markers

from .util import process_crs
from .utilities import save, show # noqa
Expand Down Expand Up @@ -265,7 +267,14 @@ def draw(G, pos=None, **kwargs):
if 'edge_color' in opts:
opts['edge_line_color'] = opts.pop('edge_color')
if 'node_shape' in kwargs:
opts['node_marker'] = opts.pop('node_shape')
marker = kwargs.pop('node_shape')
if marker in markers:
marker_opts = markers[marker]
marker = marker_opts['marker']
if 'angle' in marker_opts:
Store.add_style_opts(Graph, ['node_angle'], 'bokeh')
opts['node_angle'] = marker_opts['angle']
opts['node_marker'] = marker
if 'alpha' in kwargs:
alpha = kwargs.pop('alpha')
opts['node_alpha'] = alpha
Expand Down

0 comments on commit 6d05852

Please sign in to comment.