Programmatically placing plots into a subplot
1 次查看(过去 30 天)
显示 更早的评论
I am programatically working with the antenna toolbox and getting a bunch of plots for impedance, S11, pattern, etc. I have tried to put these into a subplot, but it seems this will not work for me. The plots are interally created by calling built-in fucntions such as impedance( ), sparameters( ), current( ), pattern( ), patternAzimuth( ), and patternElevation( ). Unfortunately I do not see a way to get a figure handle from these built in functions. Is there a work around so I can have a single subplot with all of these figures in one window?
Thanks,
Jrod
2 个评论
Star Strider
2022-2-18
I don’t have the Antenna Toolbox, however I can likely access it here with the online Run feature.
Please post relevant parts of your code (including necessary data, preferably as text or spreadsheet files since dealing with .mat files with the online Run feature can be challenging) so that it is possible to run it and experiment with it. (Some Toolbox plots, such as those produced by the Control System Toolbox, can be challenging to modify, however getting relevant properties and using them is usually possible.)
回答(1 个)
VINAYAK LUHA
2023-10-11
Hi Jrod,
I understand that you are utilizing built-in functions from the Antenna Toolbox to generate various plots. However, you are seeking a solution to organize these plots into subplots within a single figure.
Here is a workaround which involves saving the generated figures and then arranging them in subplots:
- Firstly, Save each of the generated figures as ".fig" files using the "savefig" function. Refer to the documentation of "savefig" here - https://in.mathworks.com/help/matlab/ref/savefig.html .
- Next, For arranging MATLAB figure (.fig) files into subplots, you can refer to the following MATLAB answers post: https://in.mathworks.com/matlabcentral/answers/101806-how-can-i-insert-my-matlab-figure-fig-files-into-multiple-subplots .
I hope this helps you organize your plots into subplots within a single figure.
Regards,
Vinayak Luha
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!