Changeset 18292


Ignore:
Timestamp:
07/27/14 18:14:12 (11 years ago)
Author:
Eric.Larour
Message:

CHG: new rgb plots + new webgl oriented rendering of plotmodel.

Location:
issm/branches/trunk-jpl-ad2/src/m/plot
Files:
4 added
5 edited

Legend:

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

    r17708 r18292  
    139139%colorbar
    140140if getfieldvalue(options,'colorbar',1)==1,
     141        if getfieldvalue(options,'rgb',0),
     142                %this is an rgb plot, very different type of colorbar!
     143                rgbcolorbar(options);
     144                colorbar off
     145                return;
     146        end
    141147        if exist(options,'colorbarcornerposition'),
    142148                c=colorbar(getfieldvalue(options,'colorbarcornerposition'),'peer',gca);
     
    240246else
    241247        %do nothing
    242 
    243248end
    244249
  • issm/branches/trunk-jpl-ad2/src/m/plot/plot_manager.m

    r17718 r18292  
    159159end
    160160
     161%Are we rendering on a browser?
     162if exist(options,'webgl'),
     163        plot_gl(md,data,options);
     164        return;
     165end
     166
    161167%Figure out if this is a semi-transparent plot.
    162168if exist(options,'googlemaps'),
  • issm/branches/trunk-jpl-ad2/src/m/plot/plot_unit.m

    r18162 r18292  
    5454                        patch( 'Faces',[C A D],'Vertices', [x y z],'FaceVertexCData',data(:),'FaceColor','interp','EdgeColor',edgecolor);
    5555                else
     56                        %do we have several columns to data, in which case we are dealing with an rgb plot?
    5657                        A=elements(:,1); B=elements(:,2); C=elements(:,3);
    57                         patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor);
     58                        if size(data,2)==3,
     59                                patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data,'FaceColor','interp','EdgeColor',edgecolor);
     60                        else
     61                                patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor);
     62                        end
    5863                end
    5964
  • issm/branches/trunk-jpl-ad2/src/m/plot/plotmodel.m

    r14401 r18292  
    3434
    3535        %Create figure
    36         f=figure(figurenumber);clf;
    37         if strcmpi(getfieldvalue(options.list{1},'visible','on'),'off'),
    38                 set(f,'Visible','Off');
     36        if ~exist(options.list{1},'webgl'),
     37                f=figure(figurenumber);clf;
     38                if strcmpi(getfieldvalue(options.list{1},'visible','on'),'off'),
     39                        set(f,'Visible','Off');
     40                end
     41        else
     42                plot_gl(md,options.list);
     43                return;
    3944        end
    4045
  • issm/branches/trunk-jpl-ad2/src/m/plot/processdata.m

    r17687 r18292  
    6262%quiver?
    6363if datasize(2)>1,
    64         datatype=3;
     64       
     65        %rgb plot or quiver plot?
     66        if getfieldvalue(options,'rgb',0),
     67                datatype=2;
     68                return;
     69        else
     70                datatype=3;
     71        end
    6572
    6673        %check number of columns, add zeros if necessary,
Note: See TracChangeset for help on using the changeset viewer.