In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to use the ggplot2 of R language to do a smooth line chart". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to use the ggplot2 of R language to do a smooth line chart".
The previous picture and text learn to draw a line chart from Nature Genetics ~ ggplot2 draws a line chart and adds a gray background to draw a line chart. One of the problems encountered is: the default line drawing of ggplot2 is basically with a tip, is there any way to make the line chart a little smoother?
Two answers are given in the message area of the article, one is to increase the number of data used in drawing, and the other is to smooth the broken line graph by using the geom_xspline () function in ggplot2's expansion package ggalt. More intimately, it also gives the reference tweet link https://mp.weixin.qq.com/s/kGsEAz6icSsEh50uOeHvBA.
Next, let's try the effect of drawing a line chart with the geom_xspline () function in ggalt.
Usually when you encounter a new package, you can find the corresponding help document directly by using the name of Bing search package.
Image.png
The github home page that opens this package has the corresponding help documentation.
Ggalt: Extra Coordinate Systems,Geoms, Statistical Transformations, Scales & Fonts for ggplot2. Translation in my broken English: extra coordinate system, layers, statistical changes, fonts, etc.) for ggplot2) the exact functions of this package will not be studied today, mainly recording how to achieve a smooth line chart
The first is to install
Just install.packages () is fine.
Install.packages ("ggalt")
Image.png A simple example to construct a data df
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.