How to create a categorical legend?


I would like to use the class “vtkCategoryLegend” to add a legend in the lower right corner of my render window. Is there any example of how to use this class?

Similar to the “gear type” example I found on the ParaView homepage:

Thank you!

vtkLegendBoxActor should do the trick: