Mercurial > hg > octave-lyh
diff doc/interpreter/sparseimages.m @ 11039:4cbb08163a1f
Use Octave to create pdf versions of plots for documentation.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Tue, 28 Sep 2010 19:22:01 -0700 |
parents | d9c8916bb9dd |
children | fd0a3ac60b0e |
line wrap: on
line diff
--- a/doc/interpreter/sparseimages.m +++ b/doc/interpreter/sparseimages.m @@ -17,6 +17,7 @@ ## <http://www.gnu.org/licenses/>. function sparseimages (nm, typ) + backend ("gnuplot"); set_print_size (); if (strcmp (typ, "png")) set (0, "defaulttextfontname", "*"); @@ -72,7 +73,7 @@ hide_output (); endfunction -function txtimages(nm,n,typ) +function txtimages(nm, n, typ) a = 10*speye(n) + sparse(1:n,ceil([1:n]/2),1,n,n) + ... sparse(ceil([1:n]/2),1:n,1,n,n); if (strcmp (nm, "gplot") || strcmp (nm, "grid")) @@ -99,7 +100,7 @@ endif endfunction -function otherimages(nm,n,typ) +function otherimages(nm, n, typ) hide_output (); if (strcmp (typ, "eps")) d_typ = "-depsc2"; @@ -135,7 +136,7 @@ endif endfunction -function printsparse(a,nm) +function printsparse(a, nm) fid = fopen (nm,"wt"); fputs (fid, "\n"); for i = 1:size(a,1) @@ -173,7 +174,7 @@ fclose(fid); endfunction -function femimages (nm,typ) +function femimages (nm, typ) hide_output (); if (strcmp (typ, "eps")) d_typ = "-depsc2"; @@ -289,7 +290,7 @@ z = sin (r) ./ r; unwind_protect mesh (x, y, z); - title ("Sorry, graphics not available because octave was\\ncompiled without the sparse matrix implementation."); + title ("Sorry, graphics are unavailable because Octave was\ncompiled without a sparse matrix implementation."); unwind_protect_cleanup print (cstrcat (nm, ".", typ), d_typ); hide_output ();