Changeset 2819


Ignore:
Timestamp:
01/13/10 12:08:01 (15 years ago)
Author:
Eric.Larour
Message:

Introduced nlines and ncols options

Location:
issm/trunk/src/m/classes/public/plot
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/plot/applyoptions.m

    r2784 r2819  
    8787%Caxis
    8888if exist(options,'caxis'),
    89         caxis(getfieldvalue(options,'caxis'));
     89        if exist(options,'log'),
     90                logvalue=getfieldvalue(options,'log');
     91                caxis(log(getfieldvalue(options,'caxis'))/log(logvalue));
     92        else
     93                caxis(getfieldvalue(options,'caxis'));
     94        end
    9095end
    9196
  • issm/trunk/src/m/classes/public/plot/plot_manager.m

    r2694 r2819  
    1 function plot_manager(md,options,width,i);
     1function plot_manager(md,options,subplotwidth,nlines,ncols,i);
    22%PLOT__MANAGER - distribute the plots, called by plotmodel
    33%
     
    122122
    123123%standard plot:
    124 subplot(width,width,i);
     124subplot(nlines,ncols,i);
    125125plot_unit(x,y,z,elements,data2,isongrid,is2d,isquiver,options);
    126126
  • issm/trunk/src/m/classes/public/plot/plot_mesh.m

    r2439 r2819  
    1 function plot_mesh(md,options,width,i);
     1function plot_mesh(md,options,nlines,ncols,i);
    22%PLOT_MESH - plot model mesh
    33%
     
    1111
    1212%plot mesh
    13 subplot(width,width,i);
     13subplot(nlines,ncols,i);
    1414
    1515%plot mesh
  • issm/trunk/src/m/classes/public/plot/plotmodel.m

    r2623 r2819  
    1010options=plotoptions(varargin{:});
    1111
    12 %get numberof subplot
     12%get number of subplots
    1313subplotwidth=ceil(sqrt(options.numberofplots));
     14
     15%if nlines and ncols specified, then bypass.
     16if exist(options.list{1},'nlines'),
     17        nlines=getfieldvalue(options.list{1},'nlines');
     18else
     19        nlines=subplotwidth;
     20end
     21
     22if exist(options.list{1},'ncols'),
     23        ncols=getfieldvalue(options.list{1},'ncols');
     24else
     25        ncols=subplotwidth;
     26end
     27
     28%check that nlines and ncols were given at the same time!
     29if ((exist(options.list{1},'ncols') & ~exist(options.list{1},'ncols')) | (~exist(options.list{1},'ncols') & exist(options.list{1},'ncols')))
     30        error('plotmodel error message: nlines and ncols  need to be specified together, or not at all');
     31end
    1432
    1533%Get figure number and number of plots
     
    3048
    3149                %call unit plot
    32                 plot_manager(md,options.list{i},subplotwidth,i);
     50                plot_manager(md,options.list{i},subplotwidth,nlines,ncols,i);
    3351
    3452        end
Note: See TracChangeset for help on using the changeset viewer.