Changeset 25929


Ignore:
Timestamp:
01/05/21 19:59:08 (4 years ago)
Author:
jdquinn
Message:

CHG: Changes to plotting of partition overlay; minor clean up

Location:
issm/trunk-jpl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/m4/issm_options.m4

    r25876 r25929  
    342342                HAVE_MATLAB=no
    343343        else
    344                 HAVE_MATLAB=yes
    345344                if ! test -d "${MATLAB_ROOT}"; then
    346345                        AC_MSG_ERROR([MATLAB directory provided (${MATLAB_ROOT}) does not exist!]);
     
    349348                        AC_MSG_ERROR([Couldn't find mex.h... check your installation of MATLAB])
    350349                fi
     350                HAVE_MATLAB=yes
    351351        fi
    352352        AC_MSG_RESULT([${HAVE_MATLAB}])
  • issm/trunk-jpl/src/m/plot/applyoptions.m

    r25623 r25929  
    448448
    449449%flag edges of a partition
    450 if exist(options,'partitionedges') & ~strcmp(getfieldvalue(options,'partitionedges','off'),'off')
    451         mdp=getfieldvalue(options,'partitionedges','off');
    452         if ischar(mdp)
    453                 mdp=md;
    454         end
    455         [xsegments ysegments]=flagedges(mdp.mesh.elements,mdp.mesh.x,mdp.mesh.y,mdp.qmu.partition);
     450%
     451% TODO:
     452% - Figure out how to expand string representing an object (e.g.
     453%       'md.qmu.variables.thickness.partition') to get the actual value *without*
     454%       using `eval` and like functions (md.('token').('token') works, but how do
     455%       we access md given the string 'md').
     456if exist(options,'partition')
     457        partition=getfieldvalue(options,'partition','');
     458        if isvector(partition) & isnumeric(partition) % partition option is vector
     459                % do nothing: we already have a partition vector
     460        % elseif ischar(partition) & ~isempty(partition) % partition option is string
     461        %       % expand string
     462        %       partition=eval(partition);
     463        %       class(partition);
     464        %       if ~(isvector(partition) & isnumeric(partition))
     465        %               error('String passed to ''partition'' option does not represent a partition vector');
     466        %       end
     467        else
     468                error('If ''partition'' option is supplied, it should be a partition vector object');
     469        end
     470        mdp=md;
     471        [xsegments ysegments]=flagedges(mdp.mesh.elements,mdp.mesh.x,mdp.mesh.y,partition);
    456472        xsegments=xsegments*getfieldvalue(options,'unit',1);
    457473        ysegments=ysegments*getfieldvalue(options,'unit',1);
  • issm/trunk-jpl/src/m/plot/plotdoc.m

    r19016 r25929  
    122122disp('       ''mask'': list of flags of size numberofnodes or numberofelements. Only ''true'' values are plotted ');
    123123disp('       ''nan'': value assigned to NaNs (convenient when plotting BC)');
    124 disp('       ''partitionedges'': ''off'' by default. overlay plot of partition edges');
     124disp('       ''partition'': a partion vector. generates overlay plot of partition edges');
    125125disp('       ''log'': value of log');
    126126disp('       ''latlon'': ''on'' or {latstep lonstep [resolution [color]]} where latstep,longstep and resolution are in degrees, color is a [r g b] array');
  • issm/trunk-jpl/src/m/plot/plotdoc.py

    r24262 r25929  
    127127    #                'border': " size of printlay border (in pixels). active only for overlay plots",
    128128    #                'nan': " value assigned to NaNs (convenient when plotting BC)",
    129     #                'partitionedges': " 'off' by default. overlay plot of partition edges",
     129    #                'partition: " a partion vector. generates overlay plot of partition edges",
    130130    #                'latlon': " 'on' or {latstep lonstep [resolution [color]]} where latstep, longstep and resolution are in degrees, color is a [r g b] array",
    131131    #                'latlonnumbering': " 'on' or {latgap longap colornumber latangle lonangle} where latgap and longap are pixel gaps for the numbers",
Note: See TracChangeset for help on using the changeset viewer.