I want to show upto 3 plots(using gscatter) at a time where the user will select an item from pop-up menu or listbox
2 ビュー (過去 30 日間)
古いコメントを表示
this code UI('Item_name',option) generates my gscatter image in command window,(problem is the 3 plots are same, only difference of colours based on option; so "hold on" does not work in my case) i want to build a GUI for this.
0 件のコメント
回答 (1 件)
Sudhanshu Bhatt
2015 年 7 月 23 日
Hi Baibhav Vishal,
I am assuming that the data sets are to be represented in the same axis. In this case you could use color and symbol properties of "gscatter" function:
Example:
Figure;
gscatter(xData,yData,group,'rb','+x')
hold on;
gscatter(xData,yData,group,'yg','o.')
In this example: 'rb' and 'yg' correspond to Red, Blue, Yellow and Green colors for the graphs '+x' and 'o.' correspond to the symbols or markers which will represent the data sets.
More information on "gscatter" function can be found in the documentation link below:
If the data sets are to be represented in different axis on the figure then you can make use of "subplot" function:
Example:
figure;
subplot(2,1,1);
gscatter(xData,yData,group);
subplot(2,1,2);
gscatter(xData,yData,group);
This code will create a figure with axis in tiled positions, and datasets plotted in different axis.
More information on "subplot" function can be found in the documentation link below:
Hope this helps.
Thanks
Sudhanshu Bhatt
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!