Skip to content

nexus_annotation

matlab_compat · scripts/matlab_compat/nexus_annotation.m

NEXUS_ANNOTATION The Annotation property of a graphics object.

MATLAB gives every graphics object an Annotation, whose LegendInformation decides whether the object appears in a legend. MATLAB calls this class matlab.graphics.eventdata.Annotation.

Nexus stored [] there, so the two forms callers use behaved differently: the chained assignment worked by auto-creating a struct, while the nested get/set form silently did nothing, because get () on [] answers [] and set () on a value writes nowhere. Both forms now reach the same live object:

h.Annotation.LegendInformation.IconDisplayStyle = ’off’; set (get (get (h, ’Annotation’), ’LegendInformation’), ... ’IconDisplayStyle’, ’off’);

Real case: MTEX writes the first form in plotEllipse and plotEllipsoid and the second in orientationPlot and plotEllipse, so both are on ordinary plotting paths.