MATLAB: How to keep plot tools undocked from the MATLAB window in MATLAB R2021a

dockfigureMATLABplottoolsundock

When I turn on plot tools in MATLAB R2021a, the figure I previously created gets docked to the MATLAB window. How can I change the default behavior so when I turn plot tools on, they appear in the figure window? I am executing the following code:
>> plot(1:10)
>> plottools('on')

Best Answer

In order to change the default behavior of the "plottools" function, use the following steps:
1) Execute the following command in the MATLAB command window: 
>> plot(1:10) 
2) Keeping the previous figure open, execute the following in the MATLAB command window: 
>> plottools('on') 
3) Navigate to the docked figure and use the small drop-down arrow in the right-hand corner next to “Figures – Figure 1” to undock the figure. Note that here you should select “Undock” and not “Undock Figure 1” as shown below:
4) The figure along with the plot tools should now be in a separate figure window. Once you have undocked the tools and figure into this separate window, execute the following command in the MATLAB command window: 
>> close all 
5) Once again, execute the following commands in the MATLAB command window: 
>> plot(1:10) 
>> plottools('on')
Here, you will notice that the plot tools and figure will remain undocked.