Changeset 426 for trunk/src/plot_field.m


Ignore:
Timestamp:
May 17, 2012, 10:58:49 AM (9 years ago)
Author:
sommeria
Message:

compiled matlab civ introduced in Batch mode,
minor bugs fixed for histogram of velocity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plot_field.m

    r421 r426  
    358358    end
    359359    testplot=ones(size(data.ListVarName));%default test for plotted variables
    360     xtitle=[xtitle data.ListVarName{coord_x_index}];
    361     eval(['coord_x{icell}=data.' data.ListVarName{coord_x_index} ';']);%coordinate variable set as coord_x
    362     if isfield(data,'VarAttribute')&& numel(data.VarAttribute)>=coord_x_index && isfield(data.VarAttribute{coord_x_index},'units')
    363         xtitle=[xtitle '(' data.VarAttribute{coord_x_index}.units '), '];
    364     else
    365         xtitle=[xtitle ', '];
    366     end
    367     eval(['coord_x{icell}=data.' data.ListVarName{coord_x_index} ';']);%coordinate variable set as coord_x
     360    coord_x_name{icell}=data.ListVarName{coord_x_index};
     361    coord_x{icell}=data.(data.ListVarName{coord_x_index});%coordinate variable set as coord_x
     362    if isempty(find(strcmp(coord_x_name{icell},coord_x_name(1:end-1)))) %xtitle not already selected
     363        xtitle=[xtitle coord_x_name{icell}];
     364        if isfield(data,'VarAttribute')&& numel(data.VarAttribute)>=coord_x_index && isfield(data.VarAttribute{coord_x_index},'units')
     365            xtitle=[xtitle '(' data.VarAttribute{coord_x_index}.units '), '];
     366        else
     367            xtitle=[xtitle ', '];
     368        end
     369    end
    368370    XMin(icell)=min(coord_x{icell});
    369371    XMax(icell)=max(coord_x{icell});
Note: See TracChangeset for help on using the changeset viewer.