How to set the Baseline the baseline of a plot to a certain limit

1 回表示 (過去 30 日間)
jjlivestrong
jjlivestrong 2012 年 9 月 7 日
I am trying to set a baseline for a graph, but I don't know how.
The graph goes like this:
str1_wind = [6 11];
str_wind1 = [6 11];
t = [now : 1 : now + 1];
t1 = [now + 1: 1 : now + 2];
plot(t,str1_wind,'-- bs','LineWidth',2,'MarkerEdgeColor','k','MarkerFaceColor','y','MarkerSize',10)
hold on
plot(t1,str_wind1,'--bs','LineWidth',2,'MarkerEdgeColor','k','MarkerFaceColor','y','MarkerSize',10);
hold off
grid on
datetick('x',1);
title('Wind (KNOT) versus Time (mm/dd/yy)','fontsize',12,'fontweight','b');
xlabel('Time (mm/dd/yy)','fontweight','b');
ylabel('Wind (KNOT)','fontweight','b');
grid on
I want to set the baseline in ylabel to start in 0 values, not in the minimum values of 6 as seen on the graph.
Can you please help?

採用された回答

Walter Roberson
Walter Roberson 2012 年 9 月 7 日
curylim = get(gca, 'YLimit');
set(gca, 'YLimit', [0 curylim(2)])

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePole and Zero Locations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by