Closed Yaraslaut closed 9 months ago
I guess an interface for this would involve:
label
field to GeometricObject
(defaulting to ""
)labelgeometry=True
flag to sim.plot2D
, which would simply plot the given object labels (if any) at the (2d-projected) centers of the corresponding objects. (Or in 3d, maybe only plot them if they intersect the 2d slice.)At first glance, it seems like it would be straightforward to implement and potentially quite handy, if someone wants to take a crack at it.
I can try to make a PR for this
- add a labelgeometry=True flag to sim.plot2D, which would simply plot the given object labels (if any) at the (2d-projected) centers of the corresponding objects. (Or in 3d, maybe only plot them if they intersect the 2d slice.)
Following the naming conventions for method parameters, it would be good to use label_geometry
rather than labelgeometry
as the new parameter to sim.plot2D
.
At the moment plot can add additional labels to the figure, it will point out to sources and monitors It would be great if user can provide label for geometry entity so plot will shows this labels of the objects as well.