Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: modify surf default behavior
Date: Thu, 4 Jun 2009 15:05:19 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 17
Message-ID: <h08nre$m1d$1@fred.mathworks.com>
References: <h06cdq$b1h$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1244127919 22573 172.30.248.38 (4 Jun 2009 15:05:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 4 Jun 2009 15:05:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:544829


"Alan B" <monguin61@yahoo.com> wrote in message <h06cdq$b1h$1@fred.mathworks.com>...
> I would like axis('vis3d') to be run automatically when surf is called, is this possible? I can think of two things to try:
> 1. create a new wrapper m-file, also called surf.m, that simply passes the arguments around, and calls axis('vis3d') when done. I don't know how to do this because surf is not a built-in command, so builtin() doesn't work - how can I run a specific shadowed m-file, instead of whichever MATLAB chooses as the default?
> 2. set some default axes properties. I don't know how to do this because I was unable to understand what axis('vis3d') actually does, in terms of axes aspect ratio properties. Also, is it possible to specify different default properties for 2D vs 3D plots?
> 
> Any help is appreciated.

Why not just write your own wrapper function? Call it
mysurf, or something like that. This way surf will work
as it is designed for others, or for the case in the future
when you don't want that. (It will happen too.)

John

(I'm going to write my own wrapper for surf. I'll call
it smurf. Of course, it will always use a pure blue
colormap.)