当前位置:网站首页>Ggplot2 drawing learning notes in R
Ggplot2 drawing learning notes in R
2022-07-05 07:15:00 【RS&Hydrology】
Main records of this paper R In language ggplot2 Drawing package drawing image learning notes .
1.ggplot2 Introduce
ggplot2 The core idea of is to separate drawing and data , Data related plots are separated from data independent plots , Is to draw by layer .
ggplot2 The elements of the diagram can be summarized as follows :
The biggest thing is plot( Refers to the whole picture , Include background and title), The second is axis( Include stick,text,title and stick)、legend( Include backgroud、text、title)、facet This is the second level , among facet It can be divided into external strip part ( Include backgroud and text) And internal panel part ( Include backgroud、boder And gridlines grid, The rough one is grid.major, Thin call grid.minor).
2.ggplot2 Data set and plotting
(1) install ggplot2:Install.packages(“ggplot2”)
(2) call ggplot2:library(“ggplot2”)
(3) Load your own dataset :data("iris")
(4) The plot :
IrisPlot <- ggplot2(iris, aes(Sepal.Length, Petal.Length, colour=Species))
+ geom_point()
print(IrisPlot)
understand :
- The data is iris;
- Graph attribute mapping :Sepal.Length Corresponding x Axis ,Petal.Length Corresponding y Axis ;
- Geometry object : Scatter plot ;
- The plus sign is used to add layer information ;
- Data and attribute information are contained in ggplot2 Inside .
Reference material :
Book recommendation :https://ggplot2-book.org/getting-started.html
an instruction manual :https://www.tutorialspoint.com/ggplot2/ggplot2_quick_guide.htm
边栏推荐
- Ros2 - workspace (V)
- Energy conservation and creating energy gap
- 逻辑结构与物理结构
- 2022.06.27_ One question per day
- Database SQL practice 4. Find the last of employees in all assigned departments_ Name and first_ name
- SOC_ SD_ DATA_ FSM
- 解读最早的草图-图像翻译工作SketchyGAN
- Ethtool principle introduction and troubleshooting ideas for network card packet loss (with ethtool source code download)
- Ros2 topic (VIII)
- 全局变量和静态变量的初始化
猜你喜欢
SOC_SD_CMD_FSM
【idea】Could not autowire. No beans of xxx type found
PostMessage communication
Literacy Ethernet MII interface types Daquan MII, RMII, smii, gmii, rgmii, sgmii, XGMII, XAUI, rxaui
第 2 章:小试牛刀,实现一个简单的Bean容器
Solve tensorfow GPU modulenotfounderror: no module named 'tensorflow_ core. estimator‘
[node] NVM version management tool
SOC_ SD_ DATA_ FSM
docker安装mysql并使用navicat连接
Tshydro tool
随机推荐
testing framework
【软件测试】06 -- 软件测试的基本流程
1290_ Implementation analysis of prvtaskistasksuspended() interface in FreeRTOS
Ret2xx---- common CTF template proposition in PWN
[nvidia] CUDA_ VISIBLE_ DEVICES
The problem of configuring opencv in qt5.13.2 is solved in detail
Steps and FAQs of connecting windows Navicat to Alibaba cloud server MySQL
一文揭开,测试外包公司的真实情况
Typescript get timestamp
ROS2——Service服务(九)
网易To B,柔外刚中
Application of MATLAB in Linear Algebra (4): similar matrix and quadratic form
Inftnews | drink tea and send virtual stocks? Analysis of Naixue's tea "coin issuance"
数学分析_笔记_第8章:重积分
docker安装mysql并使用navicat连接
2022.06.27_每日一题
An article was opened to test the real situation of outsourcing companies
Concurrent programming - how to interrupt / stop a running thread?
Unity UGUI不同的UI面板或者UI之间如何进行坐标匹配和变换
目标检测系列——Faster R-CNN原理详解