Changeset 24745


Ignore:
Timestamp:
04/27/20 12:59:03 (5 years ago)
Author:
Mathieu Morlighem
Message:

CHG: do not use eval, it's evil

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/applyoptions.m

    r24743 r24745  
    5151set(gca,'FontSize',getfieldvalue(options,'axisfontsize',fontsize));;
    5252if exist(options,'axis')
    53         eval(['axis ' getfieldvalue(options,'axis')]);
     53        axisopts = getfieldvalue(options,'axis');
     54        if ischar(axisopts) & contains(axisopts,' ');
     55                axisopts = strsplit(axisopts);
     56                axis(axisopts{:});
     57        else
     58                axis(axisopts);
     59        end
    5460else
    5561        if strcmp(domaintype(md.mesh),'3D'),
Note: See TracChangeset for help on using the changeset viewer.