フィルターのクリア

semilog plot with a self defined x-axis range

4 ビュー (過去 30 日間)
jie hu
jie hu 2023 年 12 月 5 日
コメント済み: Dyuman Joshi 2023 年 12 月 5 日
I have a time series data and I would like to plot them in the semilogx ranging from [10^(-4) to 10^2] as the attached figure. May I know how to do that?

回答 (1 件)

Walter Roberson
Walter Roberson 2023 年 12 月 5 日
移動済み: Walter Roberson 2023 年 12 月 5 日
T = readtable('data.xlsx', 'VariableNamingRule', 'preserve');
whos T
Name Size Bytes Class Attributes T 42x2 1905 table
T.Properties.VariableNames
ans = 1×2 cell array
{'return period (year)'} {'surge'}
plot(T, "return period (year)", "surge");
set(gca, 'XScale', 'log')
xlim([10^-4, 10^2])
  2 件のコメント
jie hu
jie hu 2023 年 12 月 5 日
thanks very much!.
Dyuman Joshi
Dyuman Joshi 2023 年 12 月 5 日
You can also use semilogx.
And another function available from R2023b onwards - xscale

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by