comparison scripts/plot/__go_draw_axes__.m @ 7161:cfa0602094e9

[project @ 2007-11-12 19:51:56 by jwe]
author jwe
date Mon, 12 Nov 2007 19:51:56 +0000
parents 89a929a3ebfd
children f2ba4aa9a5f9
comparison
equal deleted inserted replaced
7160:db85cf23875e 7161:cfa0602094e9
763 "set palette file \"-\" binary record=%d using 1:2:3:4;\n", 763 "set palette file \"-\" binary record=%d using 1:2:3:4;\n",
764 columns(palette_data)); 764 columns(palette_data));
765 fwrite (plot_stream, palette_data, "float32"); 765 fwrite (plot_stream, palette_data, "float32");
766 endif 766 endif
767 else 767 else
768 fputs (plot_stream, "set palette defined (0 \"dark-blue\", 1 \"blue\", 2 \"cyan\", 3 \"yellow\", 4 \"red\" , 5 \"dark-red\");\n"); 768 fputs (plot_stream, "set palette defined (");
769 for i = 1: columns(palette_data)
770 col = floor(palette_data(2:end,i).' * 255);
771 if (i == 1)
772 fputs (plot_stream, sprintf("%d \"#%02X%02X%02X\"", i - 1,
773 col(1), col(2), col(3)));
774 else
775 fputs (plot_stream, sprintf(", %d \"#%02X%02X%02X\"", i - 1,
776 col(1), col(2), col(3)));
777 endif
778 endfor
779 fputs (plot_stream, ");\n");
769 endif 780 endif
770 fputs (plot_stream, "unset colorbox;\n"); 781 fputs (plot_stream, "unset colorbox;\n");
771 endif 782 endif
772 783
773 case "text" 784 case "text"