Setting Common Axes for all Figures

9 ビュー (過去 30 日間)
Dhirendu Somani
Dhirendu Somani 2020 年 7 月 11 日
回答済み: madhan ravi 2020 年 7 月 11 日
fig_id = 1 ; % This is my figure id
I have to plot many figures, so is there a way to set common axes properties for all figures.
Currently I have to set same axes (e.g. below code) all the time for each new figure.
x = linspace(0,2*pi,100); y = sin(x); y1 = cos(x);
figure(fig_id); fig_id=fig_id+1;
axes1 = axes('Parent',figure(fig_id-1), 'TickDir','out','YMinorTick','on', 'YMinorGrid','on','XGrid','on', 'GridLineStyle','-' )
set(axes1,'TickLabelInterpreter','latex','FontSize',Font_axes);
plot(x,y,'Parent',axes1,'LineWidth',2);
figure(fig_id); fig_id=fig_id+1;
axes1 = axes('Parent',figure(fig_id-1), 'TickDir','out','YMinorTick','on', 'YMinorGrid','on','XGrid','on', 'GridLineStyle','-' )
set(axes1,'TickLabelInterpreter','latex','FontSize',Font_axes);
plot(x,y1,'Parent',axes1,'LineWidth',2);
  2 件のコメント
Dhirendu Somani
Dhirendu Somani 2020 年 7 月 11 日
Thanks a Lot for the Quick and Correct Response. Worked for Me !

サインインしてコメントする。

採用された回答

madhan ravi
madhan ravi 2020 年 7 月 11 日
See my comment above.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by