Changeset 22924


Ignore:
Timestamp:
07/13/18 14:11:02 (7 years ago)
Author:
Eric.Larour
Message:

CHG: allowed shpdisp, coastlines options and text3d

File:
1 edited

Legend:

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

    r22593 r22924  
    266266end
    267267
     268%shpdisp
     269if exist(options,'shpdisp'),
     270        filename=(getfieldvalue(options,'shpdisp'));
     271        style=(getfieldvalue(options,'shpstyle',{'r.-'}));
     272        linewidth=(getfieldvalue(options,'linewidth',1));
     273        for i=1:length(getfieldvalue(options,'shpdisp')),
     274                filenamei=filename{i};
     275                stylei=style{i};
     276                if length(linewidth)==1,
     277                        linewidthi=linewidth;
     278                else
     279                        linewidthi=linewidth{i};
     280                end
     281                %shpdisp(filenamei,'linestyle',stylei,'linewidth',linewidthi,'multiplier',getfieldvalue(options,'unit',1));
     282                shpdisp(filenamei,1,stylei,linewidthi,getfieldvalue(options,'unit',1));
     283        end
     284end
     285
     286
     287
    268288%text (default value is empty, not NaN...)
    269289if exist(options,'text');
     
    274294        textposition=getfieldvalue(options,'textposition');
    275295        textrotation=getfieldvalue(options,'textrotation');
     296        text3d=getfieldvalue(options,'text3d',0);
    276297        for i=1:length(getfieldvalue(options,'text'));
    277298                textstringi=textstring{i};
     
    281302                textpositioni=textposition{i};
    282303                textrotationi=textrotation{i};
    283                 h=text(textpositioni(1),textpositioni(2),10,textstringi,'FontSize',textsizei,'FontWeight',textweighti,'Color',textcolori,'Rotation',textrotationi);
     304                if ~text3d,
     305                        h=text(textpositioni(1),textpositioni(2),textstringi,'FontSize',textsizei,'FontWeight',textweighti,'Color',textcolori,'Rotation',textrotationi);
     306                else
     307                        h=text(textpositioni(1),textpositioni(2),textpositioni(3),textstringi,'FontSize',textsizei,'FontWeight',textweighti,'Color',textcolori,'Rotation',textrotationi);
     308                end
    284309                if strcmpi(getfieldvalue(options,'textclip','on'),'on'),
    285310                        set(h,'Clipping','on'); %prevent text from appearing outside of the box
     
    312337if exist(options,'contourlevels'),
    313338        plot_contour(md,data,options);
     339end
     340
     341%coastlines
     342if exist(options,'coastline')| exist(options,'coastlines'),
     343        plot_coastlines(md.mesh,options);
    314344end
    315345
Note: See TracChangeset for help on using the changeset viewer.