官术网_书友最值得收藏!

Introduction

In this chapter, you will learn about some of the simplest yet most important settings and parameters of graphs in R base graphics. Learning how to adjust colors, sizes, margins, and styles of various graph elements such as points, lines, bars, axes, and titles will give us the ability to improve upon the basic graph commands you learned in Chapter 1, R Graphics.

In the previous chapter, we got a glimpse of the different types of graphs that can be created in R using small snippets of code. Now, you will learn how to modify the fundamental building blocks of these graphs to better suit our needs.

The R base library has very powerful graphical capabilities. While you can produce pretty much any type of graph with a couple of lines of code, the default layout and look of the graph is often very basic. Sometimes, you might run into problems such as axis labels and titles getting chopped off at the edges or the legend size or position masking part of your graph. Sometimes, the default color combinations might not be suitable for presentation or publication.

In this chapter, we will go through the relevant names and accepted values of different arguments and arguments to graph functions. We will take a closer look at the par() function, which we briefly introduced in the previous chapter.

Reading and trying out all the recipes in this chapter is highly recommended as it will give you a very good hands-on grasp of certain aspects of graph manipulation, which you are likely to use a lot in any visual analysis in R.

Let's get started!

主站蜘蛛池模板: 金华市| 黔西| 渭南市| 买车| 绵阳市| 五河县| 峨眉山市| 松江区| 扶沟县| 和硕县| 武强县| 江西省| 盈江县| 拉萨市| 治多县| 吕梁市| 阿尔山市| 泉州市| 东源县| 合作市| 黔西县| 韶山市| 呼玛县| 榆中县| 西华县| 通辽市| 神木县| 永德县| 衢州市| 宁陕县| 铜鼓县| 抚顺市| 七台河市| 和硕县| 沈阳市| 清远市| 千阳县| 杨浦区| 香格里拉县| 章丘市| 班戈县|