In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
How to use ggplot2 to draw butterfly map, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
A small case, using ggplot2 to draw a butterfly chart, while consolidating the review bar axis flipping, re-familiarize yourself with how to use the grid system for layout.
The original picture is as follows:
The idea of the chart is very simple, that is, the two bars are flipped through the axes, and the layout function in the grid package is used for reasonable layout stitching.
The following is the code part of the whole case, because the knowledge points involved are not complex, no detailed comments are made here:
The first part: make the column chart on the right:
# Import Toolkit:
Library ("ggplot2")
Library ("dplyr")
Library ("grid")
Library ("showtext")
Library ("Cairo") font.add ("myfont", "msyh.ttc") # generate the dataset required for the drawing:
Mydata
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.