Changeset 80


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

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field/PLOT.m

    r60 r80  
    55[SubField,errormsg]=read_get_field(hget_field);
    66if ~isempty(errormsg)
    7     msgbox_uvmat('ERROR',['error in get_field/PLOT input:' errormsg])
     7    msgbox_uvmat('ERROR',['error in read_get_field/PLOT input:' errormsg])
    88    return
    99end
  • 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)
  • trunk/src/read_get_field.m

    r56 r80  
    8181    else
    8282        dimname_x=Field.VarDimName{VarIndex};
    83         if numel(dimname_x)~=1
     83        if iscell(dimname_x) && numel(dimname_x)~=1
    8484            errormsg='abscissa must be a one-dimensional variable';
    8585            return
  • trunk/src/series/aver_stat.m

    r76 r80  
    360360                    end
    361361                else
    362                     Data{1}=transform_fct(Data{1},XmlData);
     362                    Data{1}=transform_fct(Data{1},XmlData{1});
    363363                end
    364364             end     
  • trunk/src/series/time_series.m

    r79 r80  
    387387                    end
    388388                else
    389                     Data{1}=transform_fct(Data{1},XmlData);
     389                    Data{1}=transform_fct(Data{1},XmlData{1});
    390390                end
    391391            end     
     
    552552    delete(hget_field)
    553553end
     554RecordData
     555
    554556get_field(filemean,RecordData)
    555557   
Note: See TracChangeset for help on using the changeset viewer.