Rev | Line | |
---|
[37] | 1 | function linechart(y,color,varargin)
|
---|
| 2 | % LINECHART(Y,COLOR,VARARGIN) provides extra arguments to LABELED_CURVES.
|
---|
| 3 | % Examples:
|
---|
| 4 | % linechart(y,color)
|
---|
| 5 | % See also LABELED_CURVES.
|
---|
| 6 |
|
---|
| 7 | % sort
|
---|
| 8 | f = fieldnames(y);
|
---|
| 9 | f = f{1};
|
---|
| 10 | v = getfield(y,char(f));
|
---|
| 11 | [dummy,order] = sort(v);
|
---|
| 12 | for f = fieldnames(y)'
|
---|
| 13 | v = getfield(y,char(f));
|
---|
| 14 | y = setfield(y,char(f),v(order));
|
---|
| 15 | end
|
---|
| 16 | x = 1:length(v);
|
---|
| 17 | x = x(order);
|
---|
| 18 | %fprintf('columns are');fprintf(' %d',x);fprintf('\n');
|
---|
| 19 |
|
---|
| 20 | labeled_curves(1:length(x),y,color,varargin{:});
|
---|
| 21 | set(gca,'XTick',1:length(x),'XTickLabel',num2str(x'));
|
---|
| 22 | axis_pct;
|
---|
Note: See
TracBrowser
for help on using the repository browser.