Defining sub-groups in gscatter
5 ビュー (過去 30 日間)
古いコメントを表示
Hello everybody,
I'm having troubles in correctly using the "gscatter" function; I have three variables 'temp' (a temperature), 'en' (energy) and 'hour' (the hour of the day at which the energy was consumed, given for many different days).
I am able now to use gscatter to plot 'temp' vs. 'en' and visualize the different hours as different colors by simply using
gscatter(temp_h,en,hour);
Since there are 24 hours in a day, the visualization is not optimal. What I now would like to do is to create sub-groups of hours that could be plotted in a single color, e.g. '0 am to 4 am', '5 am to 9 am' and so on...
How could I define such subgroups and have them correctly read by 'gscatter' function? I really can't do this also considering that the third variable of gscatter should have the same length of the two other variables.
Thanks a lot in advance.
All the best.
Matteo
2 件のコメント
Mariana
2017 年 6 月 17 日
I do have same question. How can I add a colorbar that range, for example, from 0 to 24 hours, in case on the example above. I would appreciate help soon :)
Image Analyst
2017 年 6 月 17 日
Attach a small sample of your data. Failing to do that, or at least posting a screenshot, may be why no one answered the original question.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Descriptive Statistics and Visualization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!