Stackedplot -grahps spaced evenly

1 回表示 (過去 30 日間)
Kriti Salwan
Kriti Salwan 2021 年 12 月 29 日
編集済み: Sai Sumanth Korthiwada 2022 年 2 月 28 日
I have created a plot of a vs t using stacked plot function but my plot is looking very closely spaced yo each other.How I can get a plot more clear and evenly spaced for better understanding .
  1 件のコメント
Adam Danz
Adam Danz 2021 年 12 月 29 日
This is a screenshot of the attached figure.
Why are you using stackedplot? Are you sure this is the right figure?

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

回答 (1 件)

Sai Sumanth Korthiwada
Sai Sumanth Korthiwada 2022 年 2 月 28 日
編集済み: Sai Sumanth Korthiwada 2022 年 2 月 28 日
As per my understanding, a plot is created using "stackedplot" function, and the plot looked very closely spaced to each other.
To make a "stackedplot" more clear, "YLimits" property from "AxesProperties" of an object of "stackedplot" can be used to view the curve zoomed in horizontal direction, so that the fluctuations or observations are more clearly visible.
So, Increase the range of Y-axis to get a clearer figure.
For instance, observe the following code:
load outdoors
s = stackedplot(outdoors)
s.AxesProperties %displays the properties available
s.AxesProperties(1).YLimits = [0 100];
%if the current Ylimit is [0 100] try increasing the Y-axis range to [0 200] or
% more to get a clear and more evenly spaced figure
s.AxesProperties(1).YLimits = [0 200];
where s is an object of "stackedplot". As the "YLimits" range is increased, the figure appears more evenly spaced.
You can refer to stackedplot MathWorks documentation page for more info on "Stacked plot of several variables with common x-axis".

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by