# Interactive wordcloud

**URL:** https://discourse.vtk.org/t/interactive-wordcloud/9671
**Category:** Support
**Tags:** python
**Created:** [October 25, 2022, 9:31am UTC](https://discourse.vtk.org/t/interactive-wordcloud/9671 "2022-10-25T09:31:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Shree\_Lakshmi\_Ramesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/shree_lakshmi_ramesh/32/4785_2.png) [@Shree\_Lakshmi\_Ramesh](https://discourse.vtk.org/u/Shree_Lakshmi_Ramesh)
#### Post date: [October 25, 2022, 9:31am UTC](https://discourse.vtk.org/t/interactive-wordcloud/9671/1 "2022-10-25T09:31:32Z")

</div>

Hi  
I’m trying to create an interactive wordcloud, for eg. clicking the words prints the word or prints all the sentences to which they belong.

Is there any way I could achieve this?  
Thank you

---

<div class="post-metadata">

### Author: ![fraseyboo](https://discourse.vtk.org/user_avatar/discourse.vtk.org/fraseyboo/32/2411_2.png) [@fraseyboo](https://discourse.vtk.org/u/fraseyboo)
#### Post date: [October 25, 2022, 11:40am UTC](https://discourse.vtk.org/t/interactive-wordcloud/9671/2 "2022-10-25T11:40:21Z")

</div>

You’d likely have to us an interactor callback and have an actor for each word, it’s pretty simple to determine which actor is clicked on (and then update the renderer to change the color of the word if you want). but the callback function would need to do most of the heavy lifting for keeping track of the words picked and doing the sentences.

VTK has an inbuilt picking function (if you press 'p) that can be toggled on/off. There are also ‘KeyPress’ events you can use to listen for certain keys. Try looking at the sourcecode for how Vedo does callbacks, it covers the options pretty well.

---

<div class="post-metadata">

### Author: ![Shree\_Lakshmi\_Ramesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/shree_lakshmi_ramesh/32/4785_2.png) [@Shree\_Lakshmi\_Ramesh](https://discourse.vtk.org/u/Shree_Lakshmi_Ramesh)
#### Post date: [October 26, 2022, 5:34am UTC](https://discourse.vtk.org/t/interactive-wordcloud/9671/3 "2022-10-26T05:34:56Z")

</div>

Thank you… wlll try that

---

<div class="post-metadata">

### Author: ![Shree\_Lakshmi\_Ramesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/shree_lakshmi_ramesh/32/4785_2.png) [@Shree\_Lakshmi\_Ramesh](https://discourse.vtk.org/u/Shree_Lakshmi_Ramesh)
#### Post date: [October 27, 2022, 10:49am UTC](https://discourse.vtk.org/t/interactive-wordcloud/9671/4 "2022-10-27T10:49:07Z")

</div>

Hi…  
is there a way i can place words without overlapping
