What's the Default Light from Figure Toolbar > Insert Light

2 views (last 30 days)
When I plot something and create a surface object, and then I go to figure > Insert > Light, it adds like the best lighting ever. I want to replicate the lighting that is added without obviously going through the menu bar. I am assuming this is something simple, but even copying the light object position and color properties exactly can't seem to replicate it.
Any advice would be appreciated!

Answers (1)

Sean de Wolski
Sean de Wolski on 23 Apr 2013
surf(peaks)
Interactively add light
hLight = findobj(gcf,'type','light');
get(hLight)
And of course for more info:
doc light
BTW, while looking for this, I just learned about material: learn something new every day.
  3 Comments
Sean de Wolski
Sean de Wolski on 23 Apr 2013
Edited: Sean de Wolski on 23 Apr 2013
figure('WindowButtonDownFcn','insertmenufcn Light;plottools off');
surf(peaks);
Now click down on the figure. As far as doing this automatically, I have a few other things on my mind. Will update tomorrow.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!