How to plot two equal parts of axis y with unequal distances?

1 回表示 (過去 30 日間)
h k
h k 2021 年 9 月 17 日
回答済み: Star Strider 2021 年 9 月 17 日
hello.
I have this plot:
I want it to be like this:
thanks a lot

回答 (1 件)

Star Strider
Star Strider 2021 年 9 月 17 日
Set the tick locations (and displayed values if different) to specific values, and specify the tick format —
x = zeros(1,5);
y = 1:6:30;
figure
scatter(x, y, 35, y, 's', 'filled')
yticks([0 4 15 30]) % Set 'Y-Tick' Values (R2016b+)
ytickformat = '\bf %d'; % Set Bold Font Weight & Integers (R2016b+)
xlim([0 0.1])
.

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by