O'Reilly logo

MATLAB Graphics and Data Visualization Cookbook by Swapnonil Banerjee, Nivedita Majumdar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Two-dimensional scatter plots

Two-dimensional scatter plots are paired values plotted one versus the other. In this recipe, you will explore a variety of techniques used in making scatter plot visualizations.

Getting ready

You will use a famous dataset from pattern recognition literature first reported in Fisher's classic 1936 paper. The iris dataset contains four attributes of the iris plant (sepal length, sepal width, petal length, and petal width). The data is widely available, and also part of the code repository with this book.

[attribclassName] = xlsread('iris.xlsx');

How to do it...

Perform the following steps:

  1. Make the basic scatter plot using the command scatter. Execute lines 16 – 21 from the source code of this recipe to generate the annotations: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required