changeset 11690:42e936258b19 release-3-0-x

_go_draw_axes__: eliminate repeated code with get_old_gnuplot_color subfunction
author John W. Eaton <jwe@octave.org>
date Tue, 11 Mar 2008 23:38:00 -0400
parents 842cc9439011
children c6ce7274fb14
files scripts/plot/__go_draw_axes__.m
diffstat 1 files changed, 1 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/__go_draw_axes__.m	Tue Mar 11 23:33:47 2008 -0400
+++ b/scripts/plot/__go_draw_axes__.m	Tue Mar 11 23:38:00 2008 -0400
@@ -906,25 +906,7 @@
                          data_idx, colorspec, obj.linewidth);
 		fputs(plot_stream,"set style increment user;\n");
               else
-		if (isequal (edgecol, [0,0,0]))
-		  typ = -1;
-		elseif (isequal (edgecol, [1,0,0]))
-		  typ = 1;
-		elseif (isequal (edgecol, [0,1,0]))
-		  typ = 2;
-		elseif (isequal (edgecol, [0,0,1]))
-		  typ = 3;
-		elseif (isequal (edgecol, [1,0,1]))
-		  typ = 4;
-		elseif (isequal (edgecol, [0,1,1]))
-		  typ = 5;
-		elseif (isequal (edgecol, [1,1,1]))
-		  typ = -1;
-		elseif (isequal (edgecol, [1,1,0]))
-		  typ = 7;
-		else
-		  typ = -1;
-		endif
+		typ = get_old_gnuplot_color (edgecol);
                 fprintf (plot_stream,
                          "set style line %d lt %d lw %f;\n",
                          data_idx, typ, obj.linewidth);