Mercurial > hg > octave-lyh
diff scripts/plot/__pltopt1__.m @ 6146:1a6d826e92b5
[project @ 2006-11-09 03:13:11 by jwe]
author | jwe |
---|---|
date | Thu, 09 Nov 2006 03:15:23 +0000 |
parents | 76e3715e31db |
children | cc2bee854d23 |
line wrap: on
line diff
--- a/scripts/plot/__pltopt1__.m +++ b/scripts/plot/__pltopt1__.m @@ -27,7 +27,7 @@ ## Adapted-By: jwe ## Maintainer: jwe -function fmt = __pltopt1__ (caller, opt) +function [fmt, keystr] = __pltopt1__ (caller, opt) set_color = 0; set_symbol = 0; @@ -41,7 +41,8 @@ set_xerrbars = 0; set_linestyle = "solid"; - key_title = ""; + fmt = ""; + keystr = ""; more_opts = 1; @@ -65,7 +66,7 @@ endif if (! ischar (opt)) - error ("__pltopt1__: argument must be a string"); + return; endif while (more_opts) @@ -189,14 +190,10 @@ if strcmp (char, ";") working = 0; else - if (isempty (key_title)) # needs this to avoid empty matrix warning. - key_title = char; - else - key_title = strcat (key_title, char); - endif + keystr = strcat (keystr, char); endif endwhile - key_title = undo_string_escapes (key_title); + keystr = undo_string_escapes (keystr); elseif (strcmp (char, " ")) elseif (isempty(char)) ## whitespace -- do nothing. @@ -258,6 +255,4 @@ fmt = strcat (fmt, " 1 ", symbol); endif - fmt = sprintf ("%s %s \"%s\" ", fmt, TITLE, key_title); - endfunction