This doesn't quite work as well as it could. The function input arguments should be varargin rather than (var1,var2,varargin). This will fix the problem of needing 'tag' and 'property_tag' arguments. This was caused by the for/loop found on line 23. It would be quicker to use get(...) and set(...) to change the color, linetype, marker, string name, etc.