Mercurial > hg > octave-nkf
diff scripts/plot/semilogy.m @ 14001:5f0bb45e615c
doc: Update documentation for functions returning a graphics handle h (Bug #34761)
* voronoi.m, image.m, imagesc.m, imshow.m, area.m, bar.m, barh.m, clabel.m,
clf.m, compass.m, ezcontour.m, ezcontourf.m, ezmesh.m, ezmeshc.m, ezplot.m,
ezplot3.m, ezpolar.m, ezsurf.m, ezsurfc.m, feather.m, fill.m, findall.m,
findobj.m, loglog.m, mesh.m, pareto.m, patch.m, pie.m, pie3.m, plot.m, polar.m,
quiver.m, quiver3.m, rectangle.m, ribbon.m, rose.m, scatter.m, scatter3.m,
semilogx.m, semilogy.m, slice.m, stem.m, surf.m, surface.m, text.m, title.m,
trimesh.m, triplot.m, trisurf.m, xlabel.m, ylabel.m, zlabel.m:
Update documentation for functions returning a graphics handle h.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Tue, 06 Dec 2011 13:09:17 -0800 |
parents | d67c8bf52e20 |
children | 22c50cbad2ce |
line wrap: on
line diff
--- a/scripts/plot/semilogy.m +++ b/scripts/plot/semilogy.m @@ -26,6 +26,8 @@ ## Produce a two-dimensional plot using a logarithmic scale for the @var{y} ## axis. See the documentation of @code{plot} for a description of the ## arguments that @code{semilogy} will accept. +## +## The optional return value @var{h} is a graphics handle to the created plot. ## @seealso{plot, semilogx, loglog} ## @end deftypefn @@ -71,39 +73,39 @@ %! x = logspace (-5, 1, 10); %! y = logspace (-5, 1, 10); %! -%! subplot (2, 1, 1) -%! semilogy (x, y) -%! ylabel ('semilogy (x, y)') +%! subplot (2, 1, 1); +%! semilogy (x, y); +%! ylabel ("semilogy (x, y)"); %! -%! subplot (2, 1, 2) -%! semilogy (x, -y) -%! ylabel ('semilogy (x, -y)') +%! subplot (2, 1, 2); +%! semilogy (x, -y); +%! ylabel ("semilogy (x, -y)"); %!demo %! clf (); %! x = logspace (-5, 1, 10); %! y = logspace (-5, 1, 10); %! -%! subplot (2, 1, 1) -%! semilogy (x, y) -%! set (gca, "ydir", "reverse", "activepositionproperty", "outerposition") -%! ylabel ({"semilogy (x, y)", "ydir = reversed"}) +%! subplot (2, 1, 1); +%! semilogy (x, y); +%! set (gca, "ydir", "reverse", "activepositionproperty", "outerposition"); +%! ylabel ({"semilogy (x, y)", "ydir = reversed"}); %! -%! subplot (2, 1, 2) -%! semilogy (x, -y) -%! set (gca, "ydir", "reverse", "activepositionproperty", "outerposition") -%! ylabel ({"semilogy (x, -y)", "ydir = reversed"}) +%! subplot (2, 1, 2); +%! semilogy (x, -y); +%! set (gca, "ydir", "reverse", "activepositionproperty", "outerposition"); +%! ylabel ({"semilogy (x, -y)", "ydir = reversed"}); %!test %! hf = figure ("visible", "off"); %! unwind_protect %! a = logspace (-5, 1, 10); %! b = logspace (-5, 1, 10); -%! semilogy (a, b) +%! semilogy (a, b); %! assert (get (gca, "yscale"), "log"); %! assert (get (gca, "xscale"), "linear"); %! unwind_protect_cleanup -%! close (hf); +%! close (hf); %! end_unwind_protect %!test @@ -111,11 +113,10 @@ %! unwind_protect %! a = logspace (-5, 1, 10); %! b =-logspace (-5, 1, 10); -%! semilogy (a, b) -%! axis tight +%! semilogy (a, b); +%! axis tight; %! assert (all (get (gca, "ytick") < 0)); %! unwind_protect_cleanup -%! close (hf); +%! close (hf); %! end_unwind_protect -