Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Setting default shading and EdgeColor

Subject: Setting default shading and EdgeColor

From: Vidya Bhallamudi

Date: 9 Sep, 2010 14:53:21

Message: 1 of 4

I am trying to change/set the default values for shading and EdgeColor for surf plots. Are there any commands that can be included in the startup.m that can do this? Is there any other way to achieve this?

Praveen

Subject: Setting default shading and EdgeColor

From: Sean

Date: 9 Sep, 2010 16:07:04

Message: 2 of 4

"Vidya Bhallamudi" <praveen.bhallamudi@gmail.com> wrote in message <i6asd1$135$1@fred.mathworks.com>...
> I am trying to change/set the default values for shading and EdgeColor for surf plots. Are there any commands that can be included in the startup.m that can do this? Is there any other way to achieve this?
>
> Praveen

One way would be to write a wrapper function that has your defaults such as

mysurf = @(x,y,z)surf(x,y,z,'EdgeColor','g')

then call mysurf()
mysurf(x,y,z)

Subject: Setting default shading and EdgeColor

From: Steven_Lord

Date: 9 Sep, 2010 17:10:58

Message: 3 of 4



"Vidya Bhallamudi" <praveen.bhallamudi@gmail.com> wrote in message
news:i6asd1$135$1@fred.mathworks.com...
> I am trying to change/set the default values for shading and EdgeColor for
> surf plots. Are there any commands that can be included in the startup.m
> that can do this? Is there any other way to achieve this?

Read the last sentence in the "Modifying Properties" section of this
documentation page:

http://www.mathworks.com/help/techdoc/infotool/hgprop/surface_frame.html

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Setting default shading and EdgeColor

From: Jared

Date: 20 Jun, 2013 13:48:09

Message: 4 of 4

Hey,

Solution is below but first a note: it looks like the matlab guy gave us a broken link. Not very useful. What would be useful is a list of Default startup items that can be changed. If anyone can post a link to that, that'd be appreciated.

I would suggest putting the following in your matlab startup file:

set(0,'DefaultFigureRenderer','zbuffer');
set(0,'DefaultSurfaceFaceColor','interp');
set(0,'DefaultSurfaceEdgeColor','k');

The first one is unnecessary, but I've never seen openGL work well in conjunction with matlab on a linux box (which I currently use) so it's a suggestion.

Later, Jared

"Vidya Bhallamudi" wrote in message <i6asd1$135$1@fred.mathworks.com>...
> I am trying to change/set the default values for shading and EdgeColor for surf plots. Are there any commands that can be included in the startup.m that can do this? Is there any other way to achieve this?
>
> Praveen

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us