Hi, I've been doing a lot of 3D plotting and I have my code set up to have the option of certain view angles for consistency's sake. I got the code directly from the 3D plot figure's 'generate m-code' option and just copied and pasted the axis/camera angle modifications into my code.
Now I'm trying to incorporate my code into a GUI but the axis modifications don't modify the axes it the GUI. When I do something like gcf it applies the axis modifications to the entire GUI, thus making the entire GUI window into a 3D plot, not just the axes part that I want. How do I direct the axis modification code to just the axes in the GUI?
|
|
0
|
|
|
|
Reply
|
Travis
|
10/7/2010 5:27:04 AM |
|
All of the axis modification functions (axis, view, caxis, hold, etc) can optionally take an axis handle as its first input.
So for instance where you previously would write:
hold on
axis image
You should replace these with the handle to your axis as follows:
hold(myAx,'on')
axis(myAx,'image')
Thanks,
Sven.
"Travis " <trothbl1@gmail.com> wrote in message <i8jln8$p5t$1@fred.mathworks.com>...
> Hi, I've been doing a lot of 3D plotting and I have my code set up to have the option of certain view angles for consistency's sake. I got the code directly from the 3D plot figure's 'generate m-code' option and just copied and pasted the axis/camera angle modifications into my code.
>
> Now I'm trying to incorporate my code into a GUI but the axis modifications don't modify the axes it the GUI. When I do something like gcf it applies the axis modifications to the entire GUI, thus making the entire GUI window into a 3D plot, not just the axes part that I want. How do I direct the axis modification code to just the axes in the GUI?
|
|
0
|
|
|
|
Reply
|
Sven
|
10/13/2010 3:08:03 AM
|
|