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

A visualization to compare algorithm test results

Data analysts often need to compare several methods for solving a problem. Input samples can usually be classed into several categories. The challenge is to choose the method that handles all the categories in the best way. A visual way to quickly compare the test results is to use a set of bar charts in a tabular format as shown in this recipe.

Getting ready

In the previous examples, you used predefined color schemes from MATLAB. In this recipe, the color palette was chosen by Colorbrewer, an online tool for color selection for maps and other graphics. Define a color matrix to correspond with the five different sample categories under comparison, using RGB values, as follows:

Colors = [ 141 211 199;255 ...

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