Skip to content

ancestor

plot · scripts/plot/util/ancestor.m

p = ancestor (h, type)
p = ancestor (h, type, "toplevel")
  Nearest object (h itself included) above h whose Type is TYPE (a string
  or cellstr, case-insensitive).  With "toplevel" the outermost such
  object is returned instead.  A scalar h gives a handle or []; an array
  h gives a column cell array of such results.