marcomusy / vedo

A python module for scientific analysis of 3D data based on VTK and Numpy
https://vedo.embl.es
MIT License
1.98k stars 257 forks source link

how to adjust the font in legend? #982

Open zhang-qiang-github opened 7 months ago

zhang-qiang-github commented 7 months ago

I add legend to my window, and the code is:


planes = []
for p in ps:
    planes.append(vedo.Plane(...).legend(...))

lb = vedo.LegendBox(planes, font='Bongas')
vedo.show(planes, lb)

And the result is:

image

The font in legend is too small to see. How can I make the fond larger?

Thanks in advanced~~~

marcomusy commented 7 months ago

Try

import vedo
positions = [[0,0,1],[0,0,2]]
planes = []
for i,p in enumerate(positions):
    pp = vedo.Plane(p, normal=[1,0,0])
    pp.color(i).legend(f"plane{i}")
    planes.append(pp)
lb = vedo.LegendBox(planes, markers=['s','o'], font='Bongas')
vedo.show(planes, lb).close()

Screenshot from 2023-11-22 14-28-04