Mercurial > hg > octave-lyh
comparison scripts/plot/legend.m @ 6272:a1f3d3b7ee5c
[project @ 2007-02-06 02:09:48 by jwe]
author | jwe |
---|---|
date | Tue, 06 Feb 2007 02:09:48 +0000 |
parents | 44c91c5dfe1d |
children | a8dd70bacc1e |
comparison
equal
deleted
inserted
replaced
6271:6fab59e81b4e | 6272:a1f3d3b7ee5c |
---|---|
136 else | 136 else |
137 error ("legend: expecting argument to be a character string"); | 137 error ("legend: expecting argument to be a character string"); |
138 endif | 138 endif |
139 endif | 139 endif |
140 | 140 |
141 if (nargs > 0 && isempty (__plot_data__{cf}{mxi,myi})) | 141 if (nargs > 0) |
142 warning ("legend: plot data is empty; setting key labels has no effect"); | 142 have_data = false; |
143 for i = 1:nkids | |
144 if (strcmp (get (kids(k), "type"), "line")) | |
145 have_data = true; | |
146 break; | |
147 endif | |
148 endfor | |
149 if (! have_data) | |
150 warning ("legend: plot data is empty; setting key labels has no effect"); | |
151 endif | |
143 endif | 152 endif |
144 | 153 |
145 for i = 1:nargs | 154 for i = 1:nargs |
146 arg = varargin{i}; | 155 arg = varargin{i}; |
147 if (ischar (arg)) | 156 if (ischar (arg)) |