plotting multiple arrays with arbitrary x-axis side by side?

7 ビュー (過去 30 日間)
Brian
Brian 2016 年 11 月 2 日
回答済み: dpb 2016 年 11 月 2 日
so lets say I have been taking temperature data once a month for the last year for every room in my house. i want to arrange this data in separate arrays for each room. so bathroom is a 12 element array, kitchen and living room are 12 element arrays and so on. Once the arrays are built, I would like to be able to then plot these arrays on the same graph so that i can see the temperatures changes for each room over the year throughout my entire house. also would it be possible to color code each month?

回答 (1 件)

dpb
dpb 2016 年 11 月 2 日
plot will do automagically each line on same axis if arrange by column. In that orientation each line will be a different color, however, not each month. Normally one would consider each room a variable so you'd have three lines for the above.
To color code by month you could use scatter to add a marker for each observation where the color can be specified for each on top of the line plot with a single line color.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by