# PolyDraw tool not appearing in toolbar

**URL:** <https://discourse.holoviz.org/t/polydraw-tool-not-appearing-in-toolbar/3037>\
**Category:** HoloViews\
**Tags:** holoviews\
**Created:** [November 4, 2021, 10:27pm UTC](https://discourse.holoviz.org/t/polydraw-tool-not-appearing-in-toolbar/3037 "2021-11-04T22:27:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpmaxwel](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/tpmaxwel/32/2844_2.png) [@tpmaxwel](https://discourse.holoviz.org/u/tpmaxwel)\
**Post date:** [November 4, 2021, 10:27pm UTC](https://discourse.holoviz.org/t/polydraw-tool-not-appearing-in-toolbar/3037/1 "2021-11-04T22:27:49Z")

</div>

Why doesn’t the PolyDraw tool appear in the toolbar:

![Screen Shot 2021-11-04 at 4.23.40 PM](https://discourse.holoviz.org/uploads/default/original/2X/4/42acdb68814b396e41dbd2443e9de6b1370904cd.png)

---

<div class="post-metadata">

**Author:** ![jbednar](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/jbednar/32/23_2.png) [@jbednar](https://discourse.holoviz.org/u/jbednar)\
**Post date:** [November 5, 2021, 2:22pm UTC](https://discourse.holoviz.org/t/polydraw-tool-not-appearing-in-toolbar/3037/2 "2021-11-05T14:22:33Z")

</div>

Usually that’s automatic, e.g. [Polydraw — HoloViews 1.14.5 documentation](https://holoviews.org/reference/streams/bokeh/PolyDraw.html) works even without the `active_tools` bit. I can’t cut and paste your code above since it’s an image, but you could try adding `.opts(tools=['poly_draw'])`. Next time please include runnable code in your post!

---

<div class="post-metadata">

**Author:** ![tpmaxwel](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/tpmaxwel/32/2844_2.png) [@tpmaxwel](https://discourse.holoviz.org/u/tpmaxwel)\
**Post date:** [November 5, 2021, 4:06pm UTC](https://discourse.holoviz.org/t/polydraw-tool-not-appearing-in-toolbar/3037/3 "2021-11-05T16:06:26Z")

</div>

Adding the “.opts” call to the DynamicMap makes the tool appear on the toolbar, but it doesn’t work- double clicking in the image with the tool activated doesn’t create a polygon node. The same code executed statically (without the DynamicMap) works as expected. Here is the code for both:

```auto
#%%

import holoviews as hv
from holoviews import opts, streams
hv.extension('bokeh')

#%%

poly = hv.Polygons([])
poly_stream = streams.PolyDraw( source=poly, show_vertices=True, styles=dict(fill_alpha=1.0,fill_color="blue"))

def dmap_poly( **kwargs ):
    print( f"dmap keys: {kwargs.keys()}")
    return poly
    
hv.DynamicMap( dmap_poly, streams=[poly_stream] ).opts(tools=['poly_draw'])

#%%

poly1 = hv.Polygons([])
poly_stream1 = streams.PolyDraw( source=poly1, show_vertices=True, styles=dict(fill_alpha=1.0,fill_color="blue"))
poly1

#%%

```

---

<div class="post-metadata">

**Author:** ![jbednar](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/jbednar/32/23_2.png) [@jbednar](https://discourse.holoviz.org/u/jbednar)\
**Post date:** [November 8, 2021, 9:02pm UTC](https://discourse.holoviz.org/t/polydraw-tool-not-appearing-in-toolbar/3037/4 "2021-11-08T21:02:16Z")

</div>

Thanks for the reproducible example! Yes, it’s automatic when directly displaying the Polygons, but using the DynamicMap seems like you’ll need to connect that tool to the stream somehow. @jstevens or @philippjfr ?

---

<div class="post-metadata">

**Author:** ![jalo94851](https://discourse.holoviz.org/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jalo94851](https://discourse.holoviz.org/u/jalo94851)\
**Post date:** [May 6, 2023, 1:47am UTC](https://discourse.holoviz.org/t/polydraw-tool-not-appearing-in-toolbar/3037/5 "2023-05-06T01:47:27Z")

</div>

> [@tpmaxwel](#):
>
> ```auto
> hv.extension('bokeh')
> 
> ```

Facing the same issue, any solutions?
