Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Why arent the labels and ticks being ran in my code?

1 回表示 (過去 30 日間)
Daniel Nsek
Daniel Nsek 2018 年 9 月 21 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
x=[0.7,3.4,4.2,8.8,7.4];
y=[-39,680,1538,3410,3551];
ylabel('Melting Temperature in Celsius');
xlabel('Bonding Energy in eV/atom');
title('Bonding Energy vs Temperature');
yticks(0:.5:8);
plot(x,y)

回答 (1 件)

dpb
dpb 2018 年 9 月 21 日
Wrong order, call plot last or use
hold on
before plot to keep what's already been drawn.
BTW, I strongly suspect you don't mean yticks above with those values...
  4 件のコメント
Daniel Nsek
Daniel Nsek 2018 年 9 月 21 日
it should be xticks
dpb
dpb 2018 年 9 月 21 日
Yes... :)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by