How to plot grouped data
2 ビュー (過去 30 日間)
古いコメントを表示
I want to plot a scatter plot of four different features like this: https://en.wikipedia.org/wiki/Iris_flower_data_set#/media/File:Iris_dataset_scatterplot.svg
I used a command gplotmatrix and plot a data as i want, but i also want that in Row#1 and Column#1 there is a name of feauture as in the iris data set.
1 件のコメント
回答 (1 件)
Gillian Rosen
2017 年 3 月 14 日
Hi Abdullah,
To add text to a plot interactively, you can use the 'gtext' function. Input your desired text with the 'gtext' function, and a cursor will appear in your figure window. Click where you would like the text to be placed, and it will appear. See the following documentation link for examples and more information:
If you would like to add text programmatically, you can use the 'text' function instead. With this function, simply specify your desired X and Y coordinate for the location of your text along with the text itself. See the following documentation for more information:
If you would like the sub-plots with text to have no data points, as in the image you provided of the iris data, you can turn the Visibility property of the points in those plot sections to 'off'. You can do this interactively with the following steps:
1. Open the 'Plot Tools' window by clicking the corresponding icon in the figure window toolbar.
2. Select the data that you would like to remove by clicking on it.
3. In the Property Editor at the bottom of the window, click 'More Properties...'
4. In the small 'Inspector' window that appears, scroll down to the 'Visibility' property and click the checkbox to toggle visibility.
Using these steps, you should be able to produce a plot very similar to your desired iris plot.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!