フィルターのクリア

X and Y Labelling

1 回表示 (過去 30 日間)
Slarn
Slarn 2014 年 3 月 7 日
編集済み: Slarn 2014 年 3 月 7 日
I cant seem to show the label name on the 2nd figure graph. is there any error with my script? Tried some editing on the command but cant seem to get it to work. And how do I add a title to both figures? Thanks!
if true
figure
plot(o_delta(90:840,485),'XData',[0:(D*1000)/750:(D*1000)]); %plot line y 485
xlabel('Distance(mm)');
ylabel('Delta(0kg)');
figure_FontSize=12;
set(get(gca,'XLabel'),'FontSize',figure_FontSize,'Vertical','top');
set(get(gca,'YLabel'),'FontSize',figure_FontSize,'Vertical','middle');
set(findobj('FontSize',10),'FontSize',figure_FontSize);
set(gca,'tickdir','in')
set(gca,'ticklength',[0.01 0.01]);
axis on
%%%%%%%%%%%%
figure
plot(delta_diff(90:840,485),'XData',[0:(D*1000)/750:(D*1000)]); %plot line y 485
xlabel('Distance(mm)');
ylabel('Delta(3kg)');
figure_FontSize=12;
set(get(gca,'XLabel'),'FontSize',figure_FontSize,'Vertical','top');
set(get(gca,'YLabel'),'FontSize',figure_FontSize,'Vertical','middle');
set(findobj('FontSize',10),'FontSize',figure_FontSize);
set(gca,'tickdir','in')
set(gca,'ticklength',[0.01 0.01]);
axis on
end

採用された回答

Mischa Kim
Mischa Kim 2014 年 3 月 7 日
編集済み: Mischa Kim 2014 年 3 月 7 日
Just use the exact same code as for the first figure:
xlabel('Distance(mm)'); % remove xlabel1 =
ylabel('Delta(0kg)'); % remove ylabel1 =
figure_FontSize = 12;
set(get(gca,'XLabel'),'FontSize',figure_FontSize,'Vertical','top');
set(get(gca,'YLabel'),'FontSize',figure_FontSize,'Vertical','middle');
  7 件のコメント
Mischa Kim
Mischa Kim 2014 年 3 月 7 日
I am talking about the plot command on line 103. Add a figure command right before and it should work.
Slarn
Slarn 2014 年 3 月 7 日
編集済み: Slarn 2014 年 3 月 7 日
thanks! I found the error, i deleted the plot command at line 104 and it works as i not going to plot that. finally all the labels show up! :D

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by