In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "ggplot2 point map geom_point aes (shape) mapping method", so the editor summarizes the following contents to you, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "ggplot2 point map geom_point aes (shape) mapping method" article.
Different from the point shape setting, the shape mapping of a point must be transformed into a factor, and continuous variables cannot be mapped to shape.
Dat X Y shape1 16 022 6 13 3 6 24 46 35 5 6 46 15 57 25 68 35 79 4 5 810 5 5 911 14 1012 24 1113 3 4 1214 4 4 1315 5 4 1416 13 1517 23 1618 3 3 1719 4 3 1820 5 3 1921 12 2022 22 2123 32 2224 42 2325 5 2 2426 11 25
Mapping shape column data to aes (shape)
Library (ggplot2) p=ggplot (dat,aes) + geom_point (size=20) print (p)
The error will be reported directly, pay attention to the conversion factor first:
Dat$shape=factor (dat$shape) p=ggplot (dat,aes) + geom_point (size=10) print (p)
From the result picture, we can obviously know that the mapping of shape is valid, only 6, the first six factors are valid, while the later factors can not appear other shape (corresponding factors "0", "1", "2". Not the numbers 0, 1, 2.)
Therefore, in the process of data collation, it should be noted that there should be no more than six classifications based on shape mapping.
The above is about the content of this article on "the method of aes (shape) mapping in ggplot2 point map geom_point". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please follow the industry information channel.
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.