O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

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

How it works...

In the preceding visualization plot, the negative correlations are shown in blue color and the positive correlations in red color.

The scale_fill_gradient2 function is used with the limit = c(-1,1) argument as correlation coefficients range from -1 to 1 , whereas the coord_fixed() function ensures that units on the x axis are of the same length as the units on the y axis.

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