Mercurial > octave
comparison scripts/plot/__go_draw_axes__.m @ 7220:66081694ffb8
[project @ 2007-11-29 23:14:07 by jwe]
author | jwe |
---|---|
date | Thu, 29 Nov 2007 23:14:08 +0000 |
parents | 4612ef369abb |
children | dd8b3bbeeaf9 |
comparison
equal
deleted
inserted
replaced
7219:ef3fad1f36da | 7220:66081694ffb8 |
---|---|
1588 k = 1; | 1588 k = 1; |
1589 ntics = numel (tics); | 1589 ntics = numel (tics); |
1590 nlabels = numel (labels); | 1590 nlabels = numel (labels); |
1591 fprintf (plot_stream, "set format %s \"%%s\";\n", ax); | 1591 fprintf (plot_stream, "set format %s \"%%s\";\n", ax); |
1592 if (mirror) | 1592 if (mirror) |
1593 fprintf (plot_stream, "set %stics %s (", ax, colorspec); | 1593 fprintf (plot_stream, "set %stics (", ax); |
1594 else | 1594 else |
1595 fprintf (plot_stream, "set %stics nomirror %s (", ax, colorspec); | 1595 fprintf (plot_stream, "set %stics nomirror (", ax); |
1596 endif | 1596 endif |
1597 for i = 1:ntics | 1597 for i = 1:ntics |
1598 fprintf (plot_stream, " \"%s\" %g", labels(k++), tics(i)) | 1598 fprintf (plot_stream, " \"%s\" %g", |
1599 regexprep (labels(k++), "%", "%%"), tics(i)) | |
1599 if (i < ntics) | 1600 if (i < ntics) |
1600 fputs (plot_stream, ", "); | 1601 fputs (plot_stream, ", "); |
1601 endif | 1602 endif |
1602 if (k > nlabels) | 1603 if (k > nlabels) |
1603 k = 1; | 1604 k = 1; |
1604 endif | 1605 endif |
1605 endfor | 1606 endfor |
1606 fputs (plot_stream, ");\n"); | 1607 fprintf (plot_stream, ") %s;\n", colorspec); |
1607 else | 1608 else |
1608 error ("unsupported type of ticklabel"); | 1609 error ("unsupported type of ticklabel"); |
1609 endif | 1610 endif |
1610 else | 1611 else |
1611 fprintf (plot_stream, "set format %s \"%%g\";\n", ax); | 1612 fprintf (plot_stream, "set format %s \"%%g\";\n", ax); |