March 6, 2023, 6:06am
I am using vtkLegendBoxActor to show legends in a plot. However, I am unable to control the font size of text in the legend.
I have tried the following:
However, this seems not set the font size of the text. It still appears the default size of 12. I have checked the font size after setting the property as:
Which returns 3. Please help me to fix the issue.
Creating and setting composition objects is generally not advised in VTK. I’d simply do
March 14, 2023, 3:31am
I tried it, but not working. I checked the source code and found that the font size is by default set to 12. And when user resizes the window, the font size is further adjusted to fit in the ‘Legend Box’.
legendActor.LockBorderOff() and then set font size.
March 15, 2023, 3:30am
Hi Paulo Carvalho,
Thank you for the answer. This is working.