グラフのメモリラベル​をlabelsを使わ​ずに整数部の​表示桁​数を指定する方​法に​ついて

1 visualización (últimos 30 días)
K_S_
K_S_ el 29 de En. de 2024
Comentada: K_S_ el 30 de En. de 2024
下記の質問と質問内容は同じですが,欲しい回答ではなかったので質問します。
他に,整数部の表示桁数を指定する(正確に求めているものを言うと,指数表示を止める)方法はありますでしょうか。
連続でグラフプロットするため,自動で調整する機能が欲しい次第ですが,下記は直接使えないですよね?。
https://jp.mathworks.com/matlabcentral/answers/2047477-y
  2 comentarios
Dyuman Joshi
Dyuman Joshi el 29 de En. de 2024
You can change the ticks and tick labels.
It would be better if you could share more information as to what you are working with and what is the expected output.
K_S_
K_S_ el 30 de En. de 2024
2次遅れ系のステップ応答の立ち上がりから静定までを10ファイルに分割してデータを取得しています。
そのため,値の範囲はファイルごとに異なります。
ファイルを読み込み,グラフプロットする処理を10ループしています。
10個のグラフが出来上がってから,1つずつグラフのYTickLabel を自分で設定し直すのは非効率的なため避けたいと考えています。

Iniciar sesión para comentar.

Respuestas (2)

交感神経優位なあかべぇ
交感神経優位なあかべぇ el 29 de En. de 2024
座標軸が持つ各軸オブジェクトのExponentが指数値なので、この値を0にすることで、指数表示を消すことができます。
x = 1:5;
y = [100001 100002 100003 100004 100005];
plot(x, y);
haxes = gca;
haxes.YAxis.Exponent = 0;
  2 comentarios
Dyuman Joshi
Dyuman Joshi el 29 de En. de 2024
How is this different than the answer posted on the linked thread (which OP has already tried and is not satisfied with)?
交感神経優位なあかべぇ
交感神経優位なあかべぇ el 29 de En. de 2024
すみません。リンク先の回答をよく確認してませんでした。
全く同じでしたね...

Iniciar sesión para comentar.


Hiroshi Iwamura
Hiroshi Iwamura el 29 de En. de 2024
Editada: Hiroshi Iwamura el 29 de En. de 2024
YTickLabel を自分で設定するのではダメなんですか?
x = 1:5;
y = [100001 100002 100003 100004 100005];
p=plot(x, y);
ax=gca;
ax.YTick = y;
ax.YTickLabel = string(y);

Categorías

Más información sobre 2 次元および 3 次元プロット en Help Center y File Exchange.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!