From: Stephan Heise on
Hi,

I am wondering if there is a way to identify the type of an unknown plot object. I.e. given a graphics object handle, can I find out whether the object is a barseries object or a lineseries object etc.?

get(object_handle,'Type') helps a little: it returns "line" for lineseries objects. But "hggroup" for barseries objects. :(

The MATLAB help suggests to set the "tag" property of the object to make a later identification possible (http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/f7-45202.html). But this obviously requires previous preparation and doesn't work with an arbitrary plot object.

However, if I query the "ZData" property of a barseries object (which doesn't make sense of course),
get(object_handle, 'ZData'),
MATLAB returns the following error message:
"There is no 'Zdata' property in the 'barseries' class."
So MATLAB somehow has a means of finding out the object is a barseries object. Therefore I think there should be a solution to my problem.

Any ideas?

Stephan.