Mercurial > octave-nkf
comparison scripts/plot/util/private/__print_parse_opts__.m @ 20266:83792dd9bcc1
Use in-place operators in m-files where possible.
* scripts/audio/@audioplayer/set.m, scripts/audio/@audiorecorder/set.m,
scripts/audio/mu2lin.m, scripts/elfun/cosd.m, scripts/general/del2.m,
scripts/general/profexplore.m, scripts/general/quadl.m, scripts/general/rat.m,
scripts/general/rotdim.m, scripts/help/get_first_help_sentence.m,
scripts/help/private/__strip_html_tags__.m, scripts/image/cubehelix.m,
scripts/io/textread.m, scripts/linear-algebra/duplication_matrix.m,
scripts/linear-algebra/housh.m, scripts/linear-algebra/krylov.m,
scripts/linear-algebra/logm.m, scripts/linear-algebra/normest.m,
scripts/linear-algebra/onenormest.m, scripts/optimization/fminsearch.m,
scripts/optimization/lsqnonneg.m, scripts/optimization/qp.m,
scripts/plot/appearance/annotation.m, scripts/plot/appearance/axis.m,
scripts/plot/appearance/legend.m, scripts/plot/appearance/specular.m,
scripts/plot/draw/colorbar.m, scripts/plot/draw/hist.m,
scripts/plot/draw/plotmatrix.m, scripts/plot/draw/private/__stem__.m,
scripts/plot/util/__actual_axis_position__.m,
scripts/plot/util/__gnuplot_drawnow__.m, scripts/plot/util/findobj.m,
scripts/plot/util/print.m, scripts/plot/util/private/__go_draw_axes__.m,
scripts/plot/util/private/__print_parse_opts__.m, scripts/plot/util/rotate.m,
scripts/polynomial/pchip.m, scripts/polynomial/polyaffine.m,
scripts/polynomial/polyder.m, scripts/polynomial/private/__splinefit__.m,
scripts/polynomial/residue.m, scripts/signal/arch_fit.m,
scripts/signal/arch_rnd.m, scripts/signal/bartlett.m,
scripts/signal/blackman.m, scripts/signal/freqz.m, scripts/signal/hamming.m,
scripts/signal/hanning.m, scripts/signal/spectral_adf.m,
scripts/signal/spectral_xdf.m, scripts/signal/stft.m,
scripts/sparse/bicgstab.m, scripts/sparse/cgs.m,
scripts/sparse/private/__sprand_impl__.m, scripts/sparse/qmr.m,
scripts/sparse/sprandsym.m, scripts/sparse/svds.m, scripts/specfun/legendre.m,
scripts/special-matrix/gallery.m, scripts/statistics/base/gls.m,
scripts/statistics/models/logistic_regression.m,
scripts/statistics/tests/kruskal_wallis_test.m,
scripts/statistics/tests/manova.m, scripts/statistics/tests/wilcoxon_test.m,
scripts/time/datevec.m:
Use in-place operators in m-files where possible.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 26 May 2015 21:07:42 -0700 |
parents | 6b78feb92f53 |
children |
comparison
equal
deleted
inserted
replaced
20265:e914b5399c67 | 20266:83792dd9bcc1 |
---|---|
493 gs_binaries = [gs_binaries, ... | 493 gs_binaries = [gs_binaries, ... |
494 {"gs.exe", "gswin32c.exe", "gswin64c.exe", "mgs.exe"}]; | 494 {"gs.exe", "gswin32c.exe", "gswin64c.exe", "mgs.exe"}]; |
495 endif | 495 endif |
496 n = 0; | 496 n = 0; |
497 while (n < numel (gs_binaries) && isempty (ghostscript_binary)) | 497 while (n < numel (gs_binaries) && isempty (ghostscript_binary)) |
498 n = n + 1; | 498 n += 1; |
499 ghostscript_binary = file_in_path (getenv ("PATH"), gs_binaries{n}); | 499 ghostscript_binary = file_in_path (getenv ("PATH"), gs_binaries{n}); |
500 endwhile | 500 endwhile |
501 if (warn_on_no_ghostscript && isempty (ghostscript_binary)) | 501 if (warn_on_no_ghostscript && isempty (ghostscript_binary)) |
502 warning ("print:noghostscript", | 502 warning ("print:noghostscript", |
503 "print.m: ghostscript not found in PATH"); | 503 "print.m: ghostscript not found in PATH"); |
527 ## pc - Includes Win32 and mingw. | 527 ## pc - Includes Win32 and mingw. |
528 binaries = strcat (binary, {".exe"}); | 528 binaries = strcat (binary, {".exe"}); |
529 endif | 529 endif |
530 n = 0; | 530 n = 0; |
531 while (n < numel (binaries) && isempty (data.(binary).bin)) | 531 while (n < numel (binaries) && isempty (data.(binary).bin)) |
532 n = n + 1; | 532 n += 1; |
533 data.(binary).bin = file_in_path (getenv ("PATH"), binaries{n}); | 533 data.(binary).bin = file_in_path (getenv ("PATH"), binaries{n}); |
534 endwhile | 534 endwhile |
535 if (isempty (data.(binary).bin) && data.(binary).warn_on_absence) | 535 if (isempty (data.(binary).bin) && data.(binary).warn_on_absence) |
536 warning (sprintf ("print:no%s", binary), | 536 warning (sprintf ("print:no%s", binary), |
537 "print.m: '%s' not found in PATH", binary); | 537 "print.m: '%s' not found in PATH", binary); |
572 else | 572 else |
573 papersize = papersizes (strcmp (papertypes, papertype), :); | 573 papersize = papersizes (strcmp (papertypes, papertype), :); |
574 endif | 574 endif |
575 | 575 |
576 if (strcmp (paperunits, "normalized")) | 576 if (strcmp (paperunits, "normalized")) |
577 paperposition = paperposition .* papersize([1,2,1,2]); | 577 paperposition .*= papersize([1,2,1,2]); |
578 else | 578 else |
579 paperposition = convert2points (paperposition, paperunits); | 579 paperposition = convert2points (paperposition, paperunits); |
580 endif | 580 endif |
581 | 581 |
582 ## FIXME: This will be obsoleted by listeners for paper properties. | 582 ## FIXME: This will be obsoleted by listeners for paper properties. |
609 endfunction | 609 endfunction |
610 | 610 |
611 function value = convert2points (value, units) | 611 function value = convert2points (value, units) |
612 switch (units) | 612 switch (units) |
613 case "inches" | 613 case "inches" |
614 value = value * 72; | 614 value *= 72; |
615 case "centimeters" | 615 case "centimeters" |
616 value = value * 72 / 2.54; | 616 value *= 72 / 2.54; |
617 case "normalized" | 617 case "normalized" |
618 error ("print:customnormalized", | 618 error ("print:customnormalized", |
619 "print.m: papersize=='<custom>' and paperunits='normalized' may not be combined"); | 619 "print.m: papersize=='<custom>' and paperunits='normalized' may not be combined"); |
620 endswitch | 620 endswitch |
621 endfunction | 621 endfunction |