# HG changeset patch # User John W. Eaton # Date 1208291409 14400 # Node ID a626db2e8a1c5fd965d49c8e91fc101cdcc33146 # Parent 263bcc319233d269d851fc48a39243dc832d7419 view: get values from current axes if nargin == 0 diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2008-04-15 John W. Eaton + + * plot/view.m: Get values from current axes if nargin == 0. + 2008-04-015 David Bateman * plot/__patch__.m: Fix for NaN values in faces of patches. diff --git a/scripts/plot/view.m b/scripts/plot/view.m --- a/scripts/plot/view.m +++ b/scripts/plot/view.m @@ -28,7 +28,11 @@ function [azimuth, elevation] = view (x, y, z) if (nargin < 4) - if (nargin == 1) + if (nargin == 0) + tmp = get (gca (), "view"); + az = tmp(1); + el = tmp(2); + elseif (nargin == 1) if (x == 2) az = 0; el = 90;