フィルターのクリア

Focus plot and apply correct tick labels

8 ビュー (過去 30 日間)
Cary
Cary 2015 年 7 月 27 日
回答済み: Azzi Abdelmalek 2015 年 7 月 27 日
Good Evening Everyone,
I'd much rather be asking you about Bayesian analysis over this, but unfortunately, I am terrible with MATLAB plots (not due to a lack of effort though).
I have a plot attached. It contains 1739 days of data. I need to do the following three things:
Focus in on the plot so that the y axis limits are -1 and 1 (right now they are -4 and 14). I'm uninterested in any values beyond these limits. Re-label the y axis from -1 to 1 in .10 increments. Re-label the x axis so that it starts with 1, ends with 1739, and has enough points in between that it is still readable. I've studied gca, datetick, ax=gca, etc. but I cannot accomplish any of these tasks without messing up the plot.
I am gracious for any assistance provided.

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 7 月 27 日
Look at this example
t=0:0.1:10
y=8*rand(size(t))-4
plot(t,y)
ylim([-1 1])
xl=xlim
nt=8 % number of ticks
xt=linspace(xl(1),xl(2),nt)
set(gca,'xtick',xt)

その他の回答 (0 件)

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by