Mercurial > hg > octave-lyh
comparison scripts/plot/__go_draw_axes__.m @ 7462:dfcaf7ed48e3
Allow linewidth to be specified for contours
author | David Bateman |
---|---|
date | Fri, 08 Feb 2008 12:30:39 +0100 |
parents | 4b17a7297e5d |
children | 86ba621332ff |
comparison
equal
deleted
inserted
replaced
7461:da8e4aa06134 | 7462:dfcaf7ed48e3 |
---|---|
692 endswitch | 692 endswitch |
693 else | 693 else |
694 lt = ""; | 694 lt = ""; |
695 endif | 695 endif |
696 | 696 |
697 if (isfield (obj, "linewidth")) | |
698 if (have_newer_gnuplot) | |
699 lw = sprintf("linewidth %f", obj.linewidth); | |
700 else | |
701 lw = sprintf("lw %f", obj.linewidth); | |
702 endif | |
703 else | |
704 lw = ""; | |
705 endif | |
706 | |
697 if (isfield (obj, "marker")) | 707 if (isfield (obj, "marker")) |
698 if (isfield (obj, "marker")) | 708 if (isfield (obj, "marker")) |
699 switch (obj.marker) | 709 switch (obj.marker) |
700 case "+" | 710 case "+" |
701 pt = "pt 1"; | 711 pt = "pt 1"; |
766 colorspec = ""; | 776 colorspec = ""; |
767 else | 777 else |
768 colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"", | 778 colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"", |
769 round (255*color)); | 779 round (255*color)); |
770 endif | 780 endif |
771 withclause{data_idx} = sprintf ("with %s %s %s %s %s", | 781 withclause{data_idx} = sprintf ("with %s %s %s %s %s %s", |
772 style, pt, lt, ps, colorspec); | 782 style, lw, pt, lt, ps, |
783 colorspec); | |
773 else | 784 else |
774 if (isequal (color, [0,0,0])) | 785 if (isequal (color, [0,0,0])) |
775 typ = -1; | 786 typ = -1; |
776 elseif (isequal (color, [1,0,0])) | 787 elseif (isequal (color, [1,0,0])) |
777 typ = 1; | 788 typ = 1; |
788 elseif (isequal (color, [1,1,0])) | 799 elseif (isequal (color, [1,1,0])) |
789 typ = 7; | 800 typ = 7; |
790 else | 801 else |
791 typ = -1; | 802 typ = -1; |
792 endif | 803 endif |
793 withclause{data_idx} = sprintf ("with %s %s %s lt %d", | 804 withclause{data_idx} = sprintf ("with %s %s %s %s lt %d", |
794 style, pt, ps, typ); | 805 style, lw, pt, ps, typ); |
795 endif | 806 endif |
796 | 807 |
797 if (nd == 3) | 808 if (nd == 3) |
798 if (! isnan (xcol) && ! isnan (ycol) && ! isnan (zcol)) | 809 if (! isnan (xcol) && ! isnan (ycol) && ! isnan (zcol)) |
799 data{data_idx} = [[xcol; xcol(1)], [ycol; ycol(1)], ... | 810 data{data_idx} = [[xcol; xcol(1)], [ycol; ycol(1)], ... |