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

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!

主站蜘蛛池模板: 琼海市| 五常市| 榆社县| 望江县| 绥化市| 安泽县| 栾城县| 澜沧| 巍山| 新密市| 临安市| 贡山| 马鞍山市| 克拉玛依市| 孝义市| 上思县| 崇礼县| 老河口市| 平舆县| 玉溪市| 五寨县| 微山县| 保靖县| 遵化市| 安溪县| 海城市| 安福县| 镇原县| 新河县| 扎兰屯市| 自治县| 宝鸡市| 平利县| 西宁市| 阳山县| 三亚市| 获嘉县| 牡丹江市| 庐江县| 抚顺市| 台江县|