Adding plot or area chart to a boxplot

1 回表示 (過去 30 日間)
panagiotis skrempos
panagiotis skrempos 2022 年 11 月 16 日
回答済み: Jayant Gangwar 2022 年 11 月 22 日
Hi there,
I have this code below, price is a 1x24 array and energy is 5*365x24 array, from which I pass to the boxplot an array of 365x24:
figure
boxplot(energy(366:2*365,:))
hold on;
plot(price);
However the only thing that appears in the final figure is the boxplot, what do you suggest I can do in this case?
Thank you in advance for your time and your help.
  1 件のコメント
Voss
Voss 2022 年 11 月 16 日
Check that the variable price is as you expect.

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

回答 (1 件)

Jayant Gangwar
Jayant Gangwar 2022 年 11 月 22 日
Hi Panagiotis,
There might be some issue with the data that you are using. If the data in price array and energy array differ significantly in magnitude then use the "xlim" and "ylim" functions to specify the axis limits that will incorporate the data of both the arrays. Refer to the documentation below for more information on specifying the axis limits -

カテゴリ

Help Center および File ExchangeExploration and Visualization についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by