Matlab - How to make a figure current? How to make an axes current?
Date: 2022-07-11 11:03:16
If f
is the figure handle, I wanted to use plot3(..)
on it just like I would use plot(..)
, but this didn't work:
>> plot3(f, t, real(Y), imag(Y))
Error using plot3
Vectors must be the same lengths.
Then I figured out that the way to do this is to:
-
First make the relevant figure current.
-
Then use the plot3(..)
function.
I can find what the current figure is using gcf
, but how do I make a figure current (via its handle)?