Changeset 80 for trunk/src/plot_field.m


Ignore:
Timestamp:
Apr 6, 2010, 4:37:59 AM (14 years ago)
Author:
sommeria
Message:

aver_stat and time_series.sform Bug correction for phys transform
various bug corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plot_field.m

    r75 r80  
    324324coord_x_index=[];
    325325test_newplot=1;
     326hh=findobj(haxes,'tag','plot_line');
     327num_curve=numel(hh);
     328icurve=0;
    326329for icell=1:length(CellVarIndex)
    327330    testfalse=0;
     
    377380             end
    378381        end
    379     end
    380     hh=findobj(haxes,'tag','plot_line');
    381     if isequal(numel(hh),numel(find(testplot(VarIndex))))%update existing curves
    382         icurve=0;
    383         test_newplot=0;
    384         if ~isempty(VarType{icell}.discrete')
    385             charplot_0='+';
    386             LineStyle='none';
    387         else
    388             charplot_0='none';
    389             LineStyle='-';
    390         end
    391         for ivar=1:length(VarIndex)
    392             if testplot(VarIndex(ivar))
    393                 icurve=icurve+1;
    394                 VarName=data.ListVarName{VarIndex(ivar)};
    395                 eval(['data.' VarName '=squeeze(data.' VarName ');'])
    396                 set(hh(icurve),'LineStyle',LineStyle)
    397                 set(hh(icurve),'Marker',charplot_0)
    398 %                 if isequal(VarName,'A')
    399 %                     set(hh(icurve),'LineStyle','-');
    400 %                 else
    401 %                     set(hh(icurve),'LineStyle',charplot_0);
    402 %                 end
    403                 set(hh(icurve),'XData',coord_x{icell})
    404                 eval(['yy=data.' VarName ';'])
    405                 set(hh(icurve),'YData',yy);
    406 %                 eval(['nbcomponent2=size(data.' VarName ',2);']);
    407 %                 eval(['nbcomponent1=size(data.' VarName ',1);']);
    408 %                 if numel(coord_x{icell})==2
    409 %                     coord_x{icell}=linspace(coord_x{icell}(1),coord_x{icell}(2),nbcomponent1);
    410 %                 end
    411 %                 eval(['varmean=mean(double(data.' VarName '));']);%mean value
    412 %                 textmean=[textmean; {[VarName 'mean= ' num2str(varmean,4)]}];
    413 %                 if nbcomponent1==1| nbcomponent2==1
    414 %                     legend_str=[legend_str {VarName}]; %variable with one component
    415 %                 else  %variable with severals  components
    416 %                     for ic=1:min(nbcomponent1,nbcomponent2)
    417 %                         legend_str=[legend_str [VarName '_' num2str(ic)]]; %variable with severals  components
    418 %                     end                                                   % labeled by their index (e.g. color component)
    419 %                 end
    420             end
    421         end
    422     else% new plot
     382    end 
     383%     test_newplot=0;%default
     384%     if num_curve>=icurve+numel(find(testplot(VarIndex)))%update existing curves
     385%         if ~isempty(VarType{icell}.discrete')
     386%             charplot_0='+';
     387%             LineStyle='none';
     388%         else
     389%             charplot_0='none';
     390%             LineStyle='-';
     391%         end
     392%         for ivar=1:length(VarIndex)
     393%             if testplot(VarIndex(ivar))
     394%                 icurve=icurve+1;
     395%                 VarName=data.ListVarName{VarIndex(ivar)};
     396%                 eval(['data.' VarName '=squeeze(data.' VarName ');'])
     397%                 set(hh(icurve),'LineStyle',LineStyle)
     398%                 set(hh(icurve),'Marker',charplot_0)
     399%                 set(hh(icurve),'XData',coord_x{icell})
     400%                 eval(['yy=data.' VarName ';'])
     401%                 set(hh(icurve),'YData',yy);
     402%             end
     403%         end
     404%     else% new plot
    423405        if ~isempty(VarType{icell}.discrete')
    424406            charplot_0='''+''';
     
    452434            end
    453435        end
    454     end
     436%     end
    455437end
    456438if test_newplot && ~isequal(plotstr,'hhh=plot(')
    457     plotstr=[plotstr '''tag'',''plot_line'');']
     439    plotstr=[plotstr '''tag'',''plot_line'');'];
    458440                %execute plot (instruction  plotstr) 
    459441    eval(plotstr)
Note: See TracChangeset for help on using the changeset viewer.