Skip to content

Commit

Permalink
Ensure Pipeline graph does not share axes with other plots (#1438)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jun 20, 2020
1 parent b03daec commit 057a893
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions panel/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,21 +510,22 @@ def tap_renderer(plot, element):

nodes = hv.Nodes(nodes, ['x', 'y', 'Stage'], 'State').opts(
alpha=0, default_tools=['tap'], hooks=[tap_renderer],
hover_alpha=0, selection_alpha=0, nonselection_alpha=0, size=10,
backend='bokeh')
hover_alpha=0, selection_alpha=0, nonselection_alpha=0,
axiswise=True, size=10, backend='bokeh'
)
self._progress_sel.source = nodes
graph = hv.Graph((edges, nodes)).opts(
edge_hover_line_color='black', node_color='State', cmap=cmap,
tools=[], default_tools=['hover'], selection_policy=None,
node_hover_fill_color='gray', backend='bokeh')
node_hover_fill_color='gray', axiswise=True, backend='bokeh')
labels = hv.Labels(nodes, ['x', 'y'], 'Stage').opts(
yoffset=-.30, default_tools=[], backend='bokeh')
yoffset=-.30, default_tools=[], axiswise=True, backend='bokeh'
)
plot = (graph * labels * nodes) if self._linear else (graph * nodes)
plot.opts(
xaxis=None, yaxis=None, min_width=400, responsive=True,
show_frame=False, height=height, xlim=(-0.25, depth+0.25), ylim=(0, 1),
default_tools=['hover'], toolbar=None,
backend='bokeh'
show_frame=False, height=height, xlim=(-0.25, depth+0.25),
ylim=(0, 1), default_tools=['hover'], toolbar=None, backend='bokeh'
)
return plot

Expand Down

0 comments on commit 057a893

Please sign in to comment.