{"id":59246,"date":"2024-06-17T07:49:46","date_gmt":"2024-06-16T23:49:46","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=59246"},"modified":"2024-06-17T07:49:46","modified_gmt":"2024-06-16T23:49:46","slug":"ggpubr%e5%85%a8%e8%83%bd%e4%bd%9c%e5%9b%be%e5%8c%85-2","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=59246","title":{"rendered":"ggpubr\u5168\u80fd\u4f5c\u56fe\u5305"},"content":{"rendered":"<p><html><br \/>\n<head><br \/>\n<title><\/title><br \/>\n<meta charset=\"utf-8\"><br \/>\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,viewport-fit=cover\"><\/p>\n<style>\n*{margin:0;padding:0}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;line-height:1.6}img{z-index:999;position:relative;max-width:100%;margin:10px 0;}body{letter-spacing:.034em}h1,h2,h3,h4,h5,h6{font-weight:400;font-size:16px}a{color:#576b95;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}td,th{word-wrap:break-word;padding:5px 10px;border:1px solid #DDD;}table{margin-bottom:10px;border-collapse:collapse;display:table;width:100%!important;}.appmsg_skin_default .rich_media_area_primary{background-color:#fff}.appmsg_skin_default .rich_media_area_primary .weui-loadmore_line .weui-loadmore__tips{background-color:#fff}.rich_media_area_primary{padding:20px 16px 12px;background-color:#fafafa}@media (max-width:375px){.rich_media_area_primary{padding:20px 60px 15px 60px}.rich_media_area_extra{padding:0 60px 21px 60px}}@media (min-width:1024px){.rich_media_area_primary_inner,.rich_media_area_extra_inner,body{max-width:677px;margin-left:auto;margin-right:auto}.rich_media_area_primary{padding-top:32px}}.rich_media{padding:20px;overflow:hidden;}.appmsg_skin_default .rich_media_area_primary{background-color:#fff}.appmsg_skin_default .rich_media_area_primary .weui-loadmore_line .weui-loadmore__tips{background-color:#fff}@media screen and (min-width:1024px){.rich_media_area_primary_inner,.rich_media_area_extra_inner{max-width:677px;margin-left:auto;margin-right:auto}.rich_media_area_primary{padding-top:32px}}.rich_media_content{overflow:hidden;color:#333;font-size:17px;word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;text-align:justify;position:relative;z-index:0}.rich_media_content *{max-width:100%!important;box-sizing:border-box!important;-webkit-box-sizing:border-box!important;word-wrap:break-word!important}.rich_media_content p{clear:both;min-height:1em}.rich_media_content em{font-style:italic}.rich_media_content fieldset{min-width:0}.rich_media_content .list-paddingleft-1,.rich_media_content .list-paddingleft-2,.rich_media_content .list-paddingleft-3{padding-left:2.2em}.rich_media_content .list-paddingleft-1 .list-paddingleft-2,.rich_media_content .list-paddingleft-2 .list-paddingleft-2,.rich_media_content .list-paddingleft-3 .list-paddingleft-2{padding-left:30px}.rich_media_content .list-paddingleft-1{padding-left:1.2em}.rich_media_content .list-paddingleft-3{padding-left:3.2em}.rich_media_content .code-snippet,.rich_media_content .code-snippet__fix{max-width:1000%!important}.rich_media_content .code-snippet *,.rich_media_content .code-snippet__fix *{max-width:1000%!important}.rich_media_title{font-size:22px;line-height:1.4;margin-bottom:13px;padding-bottom:13px;border-bottom:1px solid #e7e7eb;}@supports(-webkit-overflow-scrolling:touch){.rich_media_title{font-weight:700}}.rich_media_meta{display:inline-block;vertical-align:middle;padding:0 0 10px 0;font-size:15px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rich_media_meta.icon_appmsg_tag{margin-right:0px}.rich_media_meta.meta_tag_text{margin-right:0}.rich_media_meta_list em{font-style:normal}.rich_media_meta_text{color:#a5a5a5;}p{margin:0;}.msgBox{margin-top:20px;padding-top:20px;padding-left:50px;overflow:hidden;border-top:2px dashed #09a2ff;}.msg{padding-top:7px;clear:both;}.msgBody{float:right;width:100%;margin-left:55px;padding-bottom:15px;border-bottom:1px dashed #e0e0e0;}.userHeadImg{float:left;margin-left:-50px;}.userHeadImg img{width:40px;height:40px;margin-right:10px;border-radius:3px;}.userName{color:#888888;line-height:24px;font-size:14px;margin:5px 0 5px 0;height:24px;}.replyBody,.autherBody{color:#565656;font-size:15px;}.replyIcon{border-left:4px solid #33ab01;margin-right:5px;}.ad{text-decoration:none;color:#d6d4d4;font-size:12px;}.msgBodyReply{padding-top:5px;}.userName span{float:right;color:#afafaf;font-size:14px;}code{text-align:left;font-size:14px;display:block;white-space:pre;display:-webkit-box;display:-webkit-flex;display:flex;position:relative;}.code-snippet__fix{font-size:14px;margin:10px 0;display:block;color:#333;position:relative;background-color:rgba(0,0,0,0.03);border:1px solid #f0f0f0;border-radius:2px;display:-webkit-box;display:-webkit-flex;display:flex;padding-left:25px;line-height:26px}.code-snippet__fix code{text-align:left;font-size:14px;display:block;white-space:pre;display:-webkit-box;display:-webkit-flex;display:flex;position:relative;font-family:Consolas,\"Liberation Mono\",Menlo,Courier,monospace}.code-snippet__comment,.code-snippet__quote{color:#afafaf;font-style:italic}.code-snippet__keyword,.code-snippet__selector-tag,.code-snippet__subst{color:#ca7d37}.code-snippet__number,.code-snippet__literal,.code-snippet__variable,.code-snippet__template-variable,.code-snippet__tag .code-snippet__attr{color:#0e9ce5}.code-snippet__string,.code-snippet__doctag{color:#d14}.code-snippet__title,.code-snippet__section,.code-snippet__selector-id{color:#d14}.code-snippet__subst{font-weight:normal}.code-snippet__type,.code-snippet__class .code-snippet__title{color:#0e9ce5}.code-snippet__tag,.code-snippet__name,.code-snippet__attribute{color:#0e9ce5;font-weight:normal}.code-snippet__regexp,.code-snippet__link{color:#ca7d37}.code-snippet__symbol,.code-snippet__bullet{color:#d14}.code-snippet__built_in,.code-snippet__builtin-name{color:#ca7d37}.code-snippet__meta{color:#afafaf}.code-snippet__deletion{background:#fdd}.code-snippet__addition{background:#dfd}.code-snippet__emphasis{font-style:italic}.code-snippet__strong{font-weight:bold}.account_avatar{width:40px;height:40px;padding:0;}.account_info{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;padding:20px 0;align-items:center}.flex_bd{padding-left:14px;}.account_nickname{display:inline-block;vertical-align:middle;line-height:1.2;color:#576b95;font-size:14px}.account_desc{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:rgba(0,0,0,0.3);font-size:14px;line-height:1.2;padding-top:.4em}.msg_source_url{text-align:left;word-break:break-all;margin-top:20px;}.msg_source_url a{padding-right:10px;}.msg_source_url .url_text{color:#a8a8a8;}.video-desc{font-size:14px;margin-top:15px;color:#6c6c6c;}.msg_source_url{text-align:left;}.original_primary_card_tips{color:rgba(0,0,0,0.3);line-height:1.4;font-size:15px;}.weui-flex__item{margin-bottom:20px;padding:20px 16px;margin-top:16px;line-height:1.4;align-items:center;background-color:#f7f7f7;border-radius:8px;position:relative;}.original_primary_desc{color:rgba(0,0,0,0.5);font-size:14px;padding-top:4px;width:auto;overflow:hidden;text-overflow:ellipsis;}.msgBodyReplyList{border-top:1px solid #e1e1e1;margin-top:10px;}.msgBodyReplyListTop{border-top:0;}.reply_like_num{float:right;font-size:14px;color:#c7c7c7;}.msgData{margin-top:20px;color:#626262;}.msgData span{font-size:14px;padding-right:15px;}.msgData .likes{float:right;padding-right:0;}.js_text_content p{font-size:18px;}.rich_media_meta_link{font-size:15px;}blockquote {padding-left: 10px;border-left: 3px solid #dbdbdb;color: rgba(0,0,0,0.5);font-size: 15px;padding-top: 4px;margin: 1em 0;}.video_iframe{width:500px;height:400px;}.blockquote_info{color:#b5b5b5;margin-top:10px;}#copyright_logo{color:#bdbdbd;}.rich_media_meta_list{margin-bottom:10px;}.reprint{background:#efefef;border-radius:5px;padding:8px;color:#1f1f1f;}.reprint a{word-break:break-all;}.topic{color:#8e8e8e;background:#f7f7f7;border-radius:5px;padding:10px 8px;}.topic a{padding-right:5px;}.topic p{margin-bottom:5px;}\n<\/style>\n<link href=\"https:\/\/www.juyifx.cn\/config\/css\/wxArticle.css\" rel=\"stylesheet\"\/>\n<\/head><script>\nvar data={\"mp\":\"\u751f\u4fe1\u679c\",\"title\":\"ggpubr\u5168\u80fd\u4f5c\u56fe\u5305\",\"time\":\"2023-07-19 19:00:40\",\"timeStamp\":\"1689764440\"};\n<\/script><br \/>\n<body><\/p>\n<div class=\"rich_media\">\n<h1 class=\"rich_media_title\" id=\"activity-name\"><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=Mzg3OTg3MjQyNg==&#038;mid=2247490354&#038;idx=1&#038;sn=e62a4db12618887decfbf2c7cd6f82a0&#038;chksm=cf7c8bf7f80b02e1304f6dac9fdbb5adc3597ccd52ae2482aff908253ec91772648ced7e27b8#rd\" target=\"_blank\" rel=\"noopener\">ggpubr\u5168\u80fd\u4f5c\u56fe\u5305<\/a><\/h1>\n<div id=\"meta_content\" class=\"rich_media_meta_list\"><span id=\"copyright_logo\" class=\"wx_tap_link js_wx_tap_highlight rich_media_meta icon_appmsg_tag appmsg_title_tag weui-wa-hotarea\">\u539f\u521b&nbsp;&nbsp;<\/span><span class=\"rich_media_meta rich_media_meta_text\">\u5c0f\u4e91&nbsp;&nbsp;<\/span><span class=\"rich_media_meta rich_media_meta_nickname\" id=\"profileBt\"><a href=\"javascript:void(0);\" class=\"wx_tap_link js_wx_tap_highlight weui-wa-hotarea\" id=\"js_name\">\u751f\u4fe1\u679c&nbsp;&nbsp;<\/a><\/span><em id=\"publish_time\" class=\"rich_media_meta rich_media_meta_text\">2023-07-19 19:00:40<\/em><\/div>\n<p><content><\/p>\n<section style=\"font-size: 16px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"text-align: left;\">\n<section>\n<section powered-by=\"xiumi.us\">\n<section style=\"letter-spacing: 0.578px;\">\n<section>\n<section style=\"width: 100%;flex: 0 0 100%;\" powered-by=\"xiumi.us\">\n<section style=\"opacity: 1;width: 100%;\">\n<section powered-by=\"xiumi.us\">\n<section style=\"line-height: 1.8;\">\n<section style=\"margin-top: 10px;margin-bottom: 20px;width: 100%;\" powered-by=\"xiumi.us\">\n<section style=\"flex-flow: row nowrap;text-align: center;width: 100%;\">\n<section style=\"display: flex;justify-content: center;flex-direction: row;\">\n<section style=\"display: inline-block;width: 100%;flex: 0 0 auto;align-self: flex-start;vertical-align: top;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;border-style: solid;border-width: 1px;border-color: rgb(67, 67, 67);height: auto;box-shadow: rgb(255, 219, 118) 6px 6px 0px;background-color: rgb(255, 255, 255);width: 100%;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"text-align: left;justify-content: flex-start;display: flex;flex-flow: row nowrap;\">\n<section style=\"display: inline-block;vertical-align: top;width: 70.0348%;align-self: flex-start;flex: 0 0 auto;height: auto;max-width: 70.0348% !important;\">\n<section style=\"margin-top: 10px;\" powered-by=\"xiumi.us\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"text-align: center;\">\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\"><strong><span style=\"font-size: 15px;\">\u751f\u4fe1\u4ebaR\u8bed\u8a00\u5b66\u4e60\u5fc5\u5907<\/span><\/strong><\/span><\/p>\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\"><strong><span style=\"font-size: 15px;\">\u7acb\u523b\u62e5\u6709\u4e00\u4e2aRstudio\u8d26\u53f7<\/span><\/strong><\/span><\/p>\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\"><strong><span style=\"font-size: 15px;\">\u5f00\u542f\u5347\u7ea7\u6a21\u5f0f\u5427<\/span><\/strong><\/span><\/p>\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"color: rgb(255, 129, 36);font-size: 12px;letter-spacing: 0.5px;\">\uff0856\u7ebf\u7a0b\uff0c256G\u5185\u5b58\uff0c\u4e2a\u4eba\u5b58\u50a81T\uff09<\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: 29.9652%;align-self: flex-start;flex: 0 0 auto;height: auto;max-width: 29.9652% !important;\">\n<section style=\"margin-top: 10px;margin-bottom: 10px;\" powered-by=\"xiumi.us\">\n<section style=\"text-align: center;line-height: 0;\">\n<section>\n<section style=\"display: inline-block;vertical-align: middle;\" powered-by=\"xiumi.us\">\n<section style=\"line-height: 0;\">\n<section style=\"width: 111px;\" powered-by=\"xiumi.us\">\n<section style=\"line-height: 1.75em;text-indent: 0em;\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;height: auto;width: 111px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/1_Xkz3aJGClianeaJMFaPKsbDRmfsHNw-9.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAxPdqELib8iaLzsvaTzaicfA3URAEIyVaH5J7WwYnm1GpxBmYrwXkz3aJGClianeaJMFaPKsbDRmfsHNw\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"400\" style=\"vertical-align: middle;width: 100%;\"  data-recalc-dims=\"1\" \/><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<section style=\"display: contents;\" powered-by=\"xiumi.us\">\n<section style=\"display: contents;\">\n<section style=\"display: contents;\">\n<section style=\"height: 0px;overflow: hidden;\"><span style=\"font-size: 14px;letter-spacing: 0.578px;caret-color: red;\">&nbsp;<\/span><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"margin: 10px 0% 8px;justify-content: flex-start;display: flex;flex-flow: row nowrap;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 100%;vertical-align: top;border-left: 3px solid rgb(219, 219, 219);border-bottom-left-radius: 0px;padding-left: 8px;align-self: flex-start;flex: 0 0 auto;\">\n<section style=\"color: rgba(0, 0, 0, 0.5);text-align: justify;font-size: 14px;\" powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;letter-spacing: 0.578px;\">\u5728\u524d\u6587\u4e2d\u6211\u4eec\u4ecb\u7ecd\u4e86\u4e00\u4e9b\u6709\u5173<\/span><span style=\"font-size: 14px;letter-spacing: 0.578px;\">\u4e0eggpubr\u7684\u4e00\u4e9b\u7ed8\u56fe\u7684\u529f\u80fd\uff0c\u4f46\u662f\u8fd9\u4e2a\u5168\u529f\u80fd\u7684\u5305\u8fd8\u53ef\u4ee5\u7ed8\u5236\u975e\u5e38\u591a\u7684\u56fe\u5f62\uff0c\u4eca\u5929\u6211\u4eec\u6765\u76d8\u70b9ggpubr\u7684\u56fe\u5f62\u5927\u5168\u3002<\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"text-align: justify;\" powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u5904\u7406\u6570\u636e\u7684\u65f6\u5019\u4e3b\u8981\u63a5\u89e6\u7684\u662f\u6570\u636e\u7c7b\u578b\u4e3a\uff0c\u5355\u53d8\u91cf\u56e0\u7d20\u8fde\u7eed\u578b\u6570\u636e\uff1b\u53cc\u53d8\u91cfX\u79bb\u6563\uff0cY\u8fde\u7eed\uff1b\u53cc\u53d8\u91cfX\uff0cY\u90fd\u8fde\u7eed\u8fd9\u51e0\u4e2a\u4e86\u7c7b\u578b\u3002<\/span><\/p>\n<p style=\"text-align: center;\"><br  \/><\/p>\n<p style=\"text-align: center;\"><br  \/><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\">\u5bc6\u5ea6\u5206\u5e03\u56fe\u3001\u76f4\u65b9\u56fe<\/span><\/em><\/strong><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u5bf9\u4e8e\u5355\u53d8\u91cf\u56e0\u7d20\u8fde\u7eed\u578b\u6570\u636e\u4e00\u822c\u7528\u5bc6\u5ea6\u5206\u5e03\u56fe\u3001\u76f4\u65b9\u56fe\u6765\u8868\u793a\uff0c\u90a3ggpuber\u4e5f\u63d0\u4f9b\u4e86\u76f8\u5173\u7684\u7ed8\u56fe\u529f\u80fd\u3002<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\"><br  \/><\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\"><br  \/><\/span><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\">\u5bc6\u5ea6\u5206\u5e03\u56fe<\/span><\/em><\/strong><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">#\u52a0\u8f7d\u76f8\u5e94\u7684R\u5305<\/span><\/code><code><span class=\"code-snippet_outer\">library(ggplot2)<\/span><\/code><code><span class=\"code-snippet_outer\">library(ggpubr)<\/span><\/code><code><span class=\"code-snippet_outer\">#\u6784\u5efa\u6570\u636e\u96c6,\u968f\u673a\u6784\u5efa\u4e00\u4e2a\u4e2a\u6570\u636e\u6846\uff0c\u5305\u62ecABCD\u56db\u4e2a\u7ec4\u522b<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__built_in\">set<\/span>.seed(<span class=\"code-snippet__number\">1234<\/span>)<\/span><\/code><code><span class=\"code-snippet_outer\">mydata &lt;- data.frame(<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp;group = rep(c(<span class=\"code-snippet__string\">\"A\"<\/span>, <span class=\"code-snippet__string\">\"B\"<\/span>,<span class=\"code-snippet__string\">\"C\"<\/span>,<span class=\"code-snippet__string\">\"D\"<\/span>), each=<span class=\"code-snippet__number\">200<\/span>),<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp;value = c(rnorm(<span class=\"code-snippet__number\">200<\/span>, mean = <span class=\"code-snippet__number\">2<\/span>), rnorm(<span class=\"code-snippet__number\">200<\/span>, <span class=\"code-snippet__number\">6<\/span>),rnorm(<span class=\"code-snippet__number\">200<\/span>,<span class=\"code-snippet__number\">2<\/span>,<span class=\"code-snippet__number\">4<\/span>),rnorm(<span class=\"code-snippet__number\">200<\/span>,<span class=\"code-snippet__number\">6<\/span>,<span class=\"code-snippet__number\">4<\/span>))<\/span><\/code><code><span class=\"code-snippet_outer\">)<\/span><\/code><code><span class=\"code-snippet_outer\">#\u7528ggdensity\u7ed8\u5236\u5bc6\u5ea6\u56fe<\/span><\/code><code><span class=\"code-snippet_outer\">ggdensity(mydata, x = <span class=\"code-snippet__string\">\"value\"<\/span>, y=<span class=\"code-snippet__string\">\"..density..\"<\/span>, #\u4e5f\u53ef\u9009\u62e9<span class=\"code-snippet__string\">\"..count..\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fill = <span class=\"code-snippet__string\">\"lightblue\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;add = <span class=\"code-snippet__string\">\"mean\"<\/span>, #\u6216\u8005<span class=\"code-snippet__string\">\"median\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rug = TRUE #\u5728\u56fe\u5f62\u4e0b\u65b9\u6dfb\u52a0\u7684\u5bc6\u5ea6\u6807\u5ea6<\/span><\/code><code><span class=\"code-snippet_outer\">)<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.9002890173410405\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/2_r4KjfrGlZJT3xHhXrrNLmDDdYmNVDg.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAztctFDciaTgXQTByLub6rkEvUYCKiaAxdanFZcLP2tIjicib8Zr4KjfrGlZJT3xHhXrrNLmDDdYmNVDg\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"692\" style=\"width: 338px;height: 305px;\" data-recalc-dims=\"1\"><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\"><br  \/><\/span><\/em><\/strong><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\">\u5206\u7ec4\u7ed8\u5236\u5bc6\u5ea6\u56fe<\/span><\/em><\/strong><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">#\u5206\u7ec4\u7ed8\u5236\u5bc6\u5ea6\u76f4\u65b9\u56fe<\/span><\/code><code><span class=\"code-snippet_outer\">ggdensity(mydata, x = <span class=\"code-snippet__string\">\"value\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;facet.by=<span class=\"code-snippet__string\">\"group\"<\/span>, #\u6309\u7167\u5206\u7ec4\u8fdb\u884c\u5206\u9762\u5904\u7406<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;color = <span class=\"code-snippet__string\">\"group\"<\/span>, fill=<span class=\"code-snippet__string\">\"group\"<\/span>, #\u586b\u5145\u6309\u7167\u7ec4\u522b\u6620\u5c04<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;palette = <span class=\"code-snippet__string\">\"lancet\"<\/span>,#\u53ef\u4ee5\u9009\u62e9<span class=\"code-snippet__string\">\"npg\"<\/span>, <span class=\"code-snippet__string\">\"aaas\"<\/span>, <span class=\"code-snippet__string\">\"lancet\"<\/span>, <span class=\"code-snippet__string\">\"jco\"<\/span>, <span class=\"code-snippet__string\">\"ucscgb\"<\/span>, <span class=\"code-snippet__string\">\"uchicago\"<\/span>, <span class=\"code-snippet__string\">\"simpsons\"<\/span> <span class=\"code-snippet__keyword\">and<\/span> <span class=\"code-snippet__string\">\"rickandmorty\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;add = <span class=\"code-snippet__string\">\"mean\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rug = TRUE,<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;alpha=<span class=\"code-snippet__number\">0.4<\/span>, #\u8c03\u6574\u900f\u660e\u5ea6<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xlab=F,ylab = <span class=\"code-snippet__string\">\"Density\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;panel.<span class=\"code-snippet__built_in\">labs<\/span>=<span class=\"code-snippet__built_in\">list<\/span>(group = c(<span class=\"code-snippet__string\">\"A\"<\/span>, <span class=\"code-snippet__string\">\"B\"<\/span>, <span class=\"code-snippet__string\">\"C\"<\/span>, <span class=\"code-snippet__string\">\"D\"<\/span>)), #\u4fee\u6539\u6bcf\u4e2apanel\u7684\u540d\u5b57<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ggtheme=theme_bw() #\u53ef\u4ee5\u662fggplot2\u4e2d\u7684\u4e3b\u9898\u7c7b\u578b<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.7612781954887218\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/3_Y0IUv7UvwpGUicIopqNHibuvAGia5g.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAxPdqELib8iaLzsvaTzaicfA3UjFaPnYGIeY0jbiaYicgBeBeCUmBLicY0IUv7UvwpGUicIopqNHibuvAGia5g\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"532\" style=\"\" data-recalc-dims=\"1\"><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">#\u8fd8\u53ef\u4ee5\u6dfb\u52a0\u76f8\u5e94\u7684\u6b63\u6001\u66f2\u7ebf\u6765\u5c55\u793a<\/span><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">p+stat_overlay_normal_density(color = <span class=\"code-snippet__string\">\"black\"<\/span>, linetype = <span class=\"code-snippet__string\">\"dashed\"<\/span>)<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.7740492170022372\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/4_CxNiaYRhibrMdz5bRdhPuEKPUZQbzA.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAxPdqELib8iaLzsvaTzaicfA3U4brsEI4jLvxL0P4OicuUykkdZZcCxNiaYRhibrMdz5bRdhPuEKPUZQbzA\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"447\" style=\"\" data-recalc-dims=\"1\"><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\"><br  \/><\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\">\u76f4\u65b9\u56fe<\/span><\/em><\/strong><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">#\u76f4\u65b9\u56fe\u5c55\u793a<\/span><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">gghistogram(mydata, x = <span class=\"code-snippet__string\">\"value\"<\/span>, fill = <span class=\"code-snippet__string\">\"group\"<\/span>,add = <span class=\"code-snippet__string\">\"mean\"<\/span>, rug = TRUE, palette = c(<span class=\"code-snippet__string\">\"#00AFBB\"<\/span>, <span class=\"code-snippet__string\">\"#E7B800\"<\/span>,<span class=\"code-snippet__string\">\"pink\"<\/span>,<span class=\"code-snippet__string\">\"lightgreen\"<\/span>))<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.7756410256410257\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/5_gmHkEeynOV9qJUNwB2c0Ol85qzfEJQ.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAxPdqELib8iaLzsvaTzaicfA3UMTMYjM4lIcZhWUal7ljWcwIfgmHkEeynOV9qJUNwB2c0Ol85qzfEJQ\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"468\" style=\"\" data-recalc-dims=\"1\"><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\">\u5206\u9762\u76f4\u65b9\u56fe<\/span><\/em><\/strong><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">gghistogram(mydata, x = <span class=\"code-snippet__string\">\"value\"<\/span>,facet.by = <span class=\"code-snippet__string\">\"group\"<\/span>#\u5206\u9762\u64cd\u4f5c<\/span><\/code><code><span class=\"code-snippet_outer\">,add_density = TRUE,#\u6dfb\u52a0\u5bc6\u5ea6\u66f2\u7ebf<\/span><\/code><code><span class=\"code-snippet_outer\">fill = <span class=\"code-snippet__string\">\"group\"<\/span>,add = <span class=\"code-snippet__string\">\"mean\"<\/span>, rug = TRUE, palette = c(<span class=\"code-snippet__string\">\"#00AFBB\"<\/span>, <span class=\"code-snippet__string\">\"#E7B800\"<\/span>,<span class=\"code-snippet__string\">\"pink\"<\/span>,<span class=\"code-snippet__string\">\"lightgreen\"<\/span>))<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.7671480144404332\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/6_dTUcUWVicS6tHySeLay4XQRGz3jEFQ.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAxPdqELib8iaLzsvaTzaicfA3UuIYo06b6BREluibRWoX18Y6G28dTUcUWVicS6tHySeLay4XQRGz3jEFQ\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"554\" style=\"\" data-recalc-dims=\"1\"><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\">\u7bb1\u7ebf\u56fe\uff0c\u5c0f\u63d0\u7434\u56fe\uff0c\u6761\u5f62\u56fe\uff0c\u70b9\u72b6\u56fe<\/span><\/em><\/strong><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u79bb\u6563\u578b\u7684\u6570\u636e\uff08X\u4e3a\u79bb\u6563\u7684\uff09\u2014\u2014\u7bb1\u7ebf\u56fe\uff0c\u5c0f\u63d0\u7434\u56fe\uff0c\u6761\u5f62\u56fe\uff0c\u70b9\u72b6\u56fe\u7b49\u3002<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u5728\u4ee5\u524d\u7684\u6587\u7ae0\u4e2d\u6211\u4eec\u4e5f\u7ed9\u4e88\u4e86\u4e00\u5199\u5c0f\u63d0\u7434\u7684\u4f5c\u56fe\u65b9\u6cd5\uff0c\u4eca\u5929\u6253\u5305\u6c47\u603b\u5404\u79cd\u56fe\u7684\u505a\u6cd5\u3002<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u7b80\u5355\u7684\u7bb1\u7ebf\u56fe\u7ed8\u5236\uff1a<\/span><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">ggboxplot(mydata, x = <span class=\"code-snippet__string\">\"group\"<\/span>, y = <span class=\"code-snippet__string\">\"value\"<\/span>, width = <span class=\"code-snippet__number\">0.8<\/span>)<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.774294670846395\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/7_tiaKxbTicNr6svXL3TGJXefRPjv0lA.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAxPdqELib8iaLzsvaTzaicfA3Udp44bjczwoh6NJwcwJ4VDP4Da9tiaKxbTicNr6svXL3TGJXefRPjv0lA\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"319\" style=\"\" data-recalc-dims=\"1\"><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">ggboxplot(mydata, x = <span class=\"code-snippet__string\">\"group\"<\/span>, y = <span class=\"code-snippet__string\">\"value\"<\/span>, width = <span class=\"code-snippet__number\">0.8<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\">select = c(<span class=\"code-snippet__string\">\"A\"<\/span>,<span class=\"code-snippet__string\">\"B\"<\/span>),#\u5982\u679c\u53ea\u60f3\u7ed8\u5236\u67d0\u4e2a\u7ec4\u4e2d\u7684\u53ef\u4ee5\u9009\u62e9<\/span><\/code><code><span class=\"code-snippet_outer\">orientation = <span class=\"code-snippet__string\">\"horizontal\"<\/span>,#\u7bb1\u7ebf\u56fe\u7684\u65b9\u5411<\/span><\/code><code><span class=\"code-snippet_outer\">fill = <span class=\"code-snippet__string\">\"group\"<\/span>,#\u586b\u5145\u6620\u5c04\u5230\u5206\u7ec4\u4e0a<\/span><\/code><code><span class=\"code-snippet_outer\">palette = c(<span class=\"code-snippet__string\">\"#00AFBB\"<\/span>, <span class=\"code-snippet__string\">\"#E7B800\"<\/span>),<\/span><\/code><code><span class=\"code-snippet_outer\">add = <span class=\"code-snippet__string\">\"dotplot\"<\/span>,#\u6dfb\u52a0\u6563\u70b9\u5728\u56fe\u4e2d,\u8fd8\u53ef\u4ee5\u9009\u62e9<span class=\"code-snippet__string\">\"none\"<\/span>, <span class=\"code-snippet__string\">\"dotplot\"<\/span>, <span class=\"code-snippet__string\">\"jitter\"<\/span>, <span class=\"code-snippet__string\">\"boxplot\"<\/span>, <span class=\"code-snippet__string\">\"point\"<\/span>, <span class=\"code-snippet__string\">\"mean\"<\/span>, <span class=\"code-snippet__string\">\"mean_se\"<\/span>, <span class=\"code-snippet__string\">\"mean_sd\"<\/span>, <span class=\"code-snippet__string\">\"mean_ci\"<\/span>, <span class=\"code-snippet__string\">\"mean_range\"<\/span>, <span class=\"code-snippet__string\">\"median\"<\/span>, <span class=\"code-snippet__string\">\"median_iqr\"<\/span>, <span class=\"code-snippet__string\">\"median_hilow\"<\/span>, <span class=\"code-snippet__string\">\"median_q1q3\"<\/span>, <span class=\"code-snippet__string\">\"median_mad\"<\/span>, <span class=\"code-snippet__string\">\"median_range\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">add.params=<span class=\"code-snippet__built_in\">list<\/span>(color = <span class=\"code-snippet__string\">\"lightblue\"<\/span>,size=<span class=\"code-snippet__number\">0.5<\/span>)#\u5bf9\u6dfb\u52a0\u7684\u5bf9\u8c61\u8fdb\u884c\u6027\u72b6\uff0c\u989c\u8272\uff0c\u5927\u5c0f\u7b49\u5b9a\u4e49)<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.7978339350180506\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/8_l9kg4k49xjKap29VBtuztop8MlVgUQ.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAxPdqELib8iaLzsvaTzaicfA3UoDohLer39e6GEeaQIpk6SPArl9kg4k49xjKap29VBtuztop8MlVgUQ\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"554\" style=\"\" data-recalc-dims=\"1\"><\/p>\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\">\u5c0f\u63d0\u7434<\/span><\/em><\/strong><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u5c0f\u63d0\u7434\u56fe\u7684\u7ed8\u5236\uff0c\u53ef\u4ee5\u67e5\u9605\u5c0f\u679c\u4ee5\u524d\u5199\u7684\u201c<a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=Mzg3OTg3MjQyNg==&amp;mid=2247490117&amp;idx=1&amp;sn=dbb1543db5db079413f63d3cdb59a51f&amp;chksm=cf7c8a80f80b039666c81da87174ad7609ec856ee5a7ff5c837d84d9c711dd3a74c87591e527&amp;scene=21#wechat_redirect\" textvalue=\"\u591a\u6e20\u9053\u7ed8\u5236\u5c0f\u63d0\u7434\u56fe\uff0c\u5b9e\u73b0\u4f5c\u56fe\u81ea\u7531\" linktype=\"text\" imgurl=\"\" imgdata=\"null\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" rel=\"noopener\">\u591a\u6e20\u9053\u7ed8\u5236\u5c0f\u63d0\u7434\u56fe\uff0c\u5b9e\u73b0\u4f5c\u56fe\u81ea\u7531<\/a>\u201d\u7684\u6587\u7ae0\u3002<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\"><br  \/><\/span><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\">\u6761\u5f62\u56fe<\/span><\/em><\/strong><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">data(<span class=\"code-snippet__string\">\"mtcars\"<\/span>)<\/span><\/code><code><span class=\"code-snippet_outer\">df2 &lt;- mtcars<\/span><\/code><code><span class=\"code-snippet_outer\">df2$cyl &lt;- factor(df2$cyl)<\/span><\/code><code><span class=\"code-snippet_outer\">df2$name &lt;- rownames(df2)#\u6dfb\u52a0\u4e00\u884c<span class=\"code-snippet__function\">name<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__title\">head<\/span><span class=\"code-snippet__params\">(df2[, c(<span class=\"code-snippet__string\">\"name\"<\/span>, <span class=\"code-snippet__string\">\"wt\"<\/span>, <span class=\"code-snippet__string\">\"mpg\"<\/span>, <span class=\"code-snippet__string\">\"cyl\"<\/span>)])<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__title\">ggbarplot<\/span><span class=\"code-snippet__params\">(df2, x=<span class=\"code-snippet__string\">\"name\"<\/span>, y=<span class=\"code-snippet__string\">\"mpg\"<\/span>, fill = <span class=\"code-snippet__string\">\"cyl\"<\/span>, color = <span class=\"code-snippet__string\">\"white\"<\/span>,<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">palette = <span class=\"code-snippet__string\">\"jco\"<\/span>,#jco\u7684\u914d\u8272<\/span><\/code><code><span class=\"code-snippet_outer\">sort.val = <span class=\"code-snippet__string\">\"asc\"<\/span>,#\u4e0a\u5347\u6392\u5e8f<\/span><\/code><code><span class=\"code-snippet_outer\">sort.by.groups=TRUE,#\u6309\u7ec4\u6392\u5e8f<\/span><\/code><code><span class=\"code-snippet_outer\">x.text.angle=<span class=\"code-snippet__number\">90<\/span>)<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.7635379061371841\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/9_9wRbRF0jSCvNWae3wtyEiaKicDJb0Q.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAxPdqELib8iaLzsvaTzaicfA3U7hXL7DKsYosvKhfwYJjbHUQIJN9wRbRF0jSCvNWae3wtyEiaKicDJb0Q\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"554\" style=\"\" data-recalc-dims=\"1\"><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\"><br  \/><\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\">\u504f\u5dee\u56fe<\/span><\/em><\/strong><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">df2$mpg_z &lt;- (df2$mpg-mean(df2$mpg))\/sd(df2$mpg)<\/span><\/code><code><span class=\"code-snippet_outer\">df2$mpg_grp &lt;- factor(ifelse(df2$mpg_z&lt;<span class=\"code-snippet__number\">0<\/span>, <span class=\"code-snippet__string\">\"low\"<\/span>, <span class=\"code-snippet__string\">\"high\"<\/span>), levels = c(<span class=\"code-snippet__string\">\"low\"<\/span>, <span class=\"code-snippet__string\">\"high\"<\/span>))<\/span><\/code><code><span class=\"code-snippet_outer\">head(df2[, c(<span class=\"code-snippet__string\">\"name\"<\/span>, <span class=\"code-snippet__string\">\"wt\"<\/span>, <span class=\"code-snippet__string\">\"mpg\"<\/span>, <span class=\"code-snippet__string\">\"mpg_grp\"<\/span>, <span class=\"code-snippet__string\">\"cyl\"<\/span>)])<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">ggbarplot(df2, x=<span class=\"code-snippet__string\">\"name\"<\/span>, y=<span class=\"code-snippet__string\">\"mpg_z\"<\/span>, fill = <span class=\"code-snippet__string\">\"mpg_grp\"<\/span>, color = <span class=\"code-snippet__string\">\"white\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\">palette = <span class=\"code-snippet__string\">\"jco\"<\/span>, sort.val = <span class=\"code-snippet__string\">\"asc\"<\/span>, sort.by.groups = FALSE, x.text.angle=<span class=\"code-snippet__number\">60<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\">ylab = <span class=\"code-snippet__string\">\"MPG z-score\"<\/span>, xlab = FALSE, legend.title=<span class=\"code-snippet__string\">\"MPG Group\"<\/span>)<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">ggbarplot(df2, x=<span class=\"code-snippet__string\">\"name\"<\/span>, y=<span class=\"code-snippet__string\">\"mpg_z\"<\/span>, fill = <span class=\"code-snippet__string\">\"mpg_grp\"<\/span>, color = <span class=\"code-snippet__string\">\"white\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;palette = <span class=\"code-snippet__string\">\"jco\"<\/span>, sort.val = <span class=\"code-snippet__string\">\"desc\"<\/span>, sort.by.groups = FALSE,<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x.text.angle=<span class=\"code-snippet__number\">90<\/span>, ylab = <span class=\"code-snippet__string\">\"MPG z-score\"<\/span>, xlab = FALSE,<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;legend.title=<span class=\"code-snippet__string\">\"MPG Group\"<\/span>, rotate=TRUE,#\u662f\u5426\u65cb\u8f6c\u7684\u53c2\u6570<\/span><\/code><code><span class=\"code-snippet_outer\"> ggtheme = theme_minimal())#\u4e00\u822c\u6211\u4eec\u7528\u7684\u504f\u5dee\u56fe\u90fd\u662f\u65cb\u8f6c<span class=\"code-snippet__number\">90<\/span>\u5ea6\u7684\u76f4\u65b9\u56fe<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.7725631768953068\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/10_6iagrDXMQz6zSNu3Vjk4eC0566p7lA.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAxPdqELib8iaLzsvaTzaicfA3UicKNVMLdFKMPBiaiaHCWTPb7a2oh6iagrDXMQz6zSNu3Vjk4eC0566p7lA\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"554\" style=\"\" data-recalc-dims=\"1\"><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\">\u70b9\u56fe<\/span><\/em><\/strong><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u68d2\u68d2\u56fe\u53ef\u4ee5\u4ee3\u66ff\u67f1\u72b6\u56fe\u6765\u5c55\u793a\u76f8\u5e94\u7684\u7ed3\u679c\uff0cggpubr\u5305\u4e2d\u4e5f\u6709\u76f8\u5e94\u7684\u51fd\u6570\u3002<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u8fd9\u91cc\u7b80\u5355\u7684\u5c55\u793a\u68d2\u68d2\u56fe\u7684\u505a\u6cd5\uff0c\u5bf9\u4e8e\u504f\u5dee\u56fe\u4e0e\u67f1\u72b6\u56fe\u7c7b\u4f3c\u3002<\/span><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">ggdotchart(df2, x=<span class=\"code-snippet__string\">\"name\"<\/span>, y=<span class=\"code-snippet__string\">\"mpg\"<\/span>, color = <span class=\"code-snippet__string\">\"cyl\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\">palette = c(<span class=\"code-snippet__string\">\"#00AFBB\"<\/span>, <span class=\"code-snippet__string\">\"#E7B800\"<\/span>, <span class=\"code-snippet__string\">\"#FC4E07\"<\/span>), sorting = <span class=\"code-snippet__string\">\"ascending\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\">add = <span class=\"code-snippet__string\">\"segments\"<\/span>, ggtheme = theme_pubr())<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.7617328519855595\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/11_f4ZScaIia7KhYxWEssThevXWCCN8nA.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAxPdqELib8iaLzsvaTzaicfA3UqnCwmGz44ic2Hh797riaSY6wyBOf4ZScaIia7KhYxWEssThevXWCCN8nA\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"554\" style=\"\" data-recalc-dims=\"1\"><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\"><br  \/><\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;\">\u76f8\u5173\u7ebf\u6027\u5206\u6790\u56fe<\/span><\/em><\/strong><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u5bf9\u4e8e\u53cc\u53d8\u91cfX\uff0cY\u90fd\u8fde\u7eed\u8fd9\u4e2a\u6570\u636e\u7c7b\u578b\uff0c\u4e00\u822c\u91c7\u7528\u76f8\u5173\u7ebf\u6027\u5206\u6790\u6765\u89e3\u51b3\uff0c\u8fd9\u4e00\u90e8\u5206\u5c0f\u679c\u4e5f\u6709\u5199\u8fc7\u4e00\u7247\u6709\u5173\u4e8e\u76f8\u5173\u6027\u5206\u6790\u7684\u56fe\u7684\u7ed8\u5236\u3002<\/span><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">data(<span class=\"code-snippet__string\">\"iris\"<\/span>)<\/span><\/code><code><span class=\"code-snippet_outer\">p &lt;- ggplot(data = iris, aes(x = Sepal.Width, y = Petal.Width,  color = Species)) + geom_point() + geom_smooth(method = lm) +<\/span><\/code><code><span class=\"code-snippet_outer\">scale_color_manual(values = c(<span class=\"code-snippet__string\">'#FF7400'<\/span>, <span class=\"code-snippet__string\">'#009999'<\/span>, <span class=\"code-snippet__string\">'#3914AF'<\/span>))  +<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__built_in\">labs<\/span>(title = <span class=\"code-snippet__string\">'iris'<\/span>) +<\/span><\/code><code><span class=\"code-snippet_outer\">theme_bw() + theme(plot.title = element_text(hjust = <span class=\"code-snippet__number\">0.5<\/span>)) +<\/span><\/code><code><span class=\"code-snippet_outer\">stat_cor(method = <span class=\"code-snippet__string\">'pearson'<\/span>, aes(x = Sepal.Width, y = Petal.Width,  color = Species))<\/span><\/code><code><span class=\"code-snippet_outer\">p<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u4ece\u4ee5\u4e0a\u7684\u5c55\u793a\u4e2d\u53ef\u4ee5\u770b\u5230\uff0cggpubr\u7684\u5168\u80fd\u6027\u975e\u5e38\u7684\u5f3a\uff0c\u53ef\u4ee5\u6db5\u76d6\u5f88\u591a\u56fe\u5f62\uff0c\u5e76\u4e14\u5feb\u901f\u7684\u5236\u4f5c\u76f8\u5e94\u7684\u56fe\u3002<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u597d\u4e86\uff0c\u8fd9\u6837\u6211\u4eecggpubr\u5305\u7684\u5206\u4eab\u5c31\u5b8c\u6210\u4e86\u3002\u5c0f\u4f19\u4f34\u4eec\u5982\u679c\u6709\u4ec0\u4e48\u95ee\u9898\u5c31\u548c\u5c0f\u679c\u8ba8\u8bba\u5427\u3002<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-cropselx1=\"0\" data-cropselx2=\"578\" data-cropsely1=\"0\" data-cropsely2=\"322\" data-galleryid=\"\" data-ratio=\"0.7193195625759417\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/12_oRxs73HBHUoxCtAqBPQnq1AXricRvg-1.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/zcicibWZessAxenwVZiaibuOTpj6MMDUj2LoPdS6tic40bbGQV7QyM6QOQY8EFoRxs73HBHUoxCtAqBPQnq1AXricRvg\/640?wx_fmt=png'\" data-type=\"jpeg\" data-w=\"823\" style=\"width: 578px;height: 416px;\" data-recalc-dims=\"1\"><\/p>\n<section style=\"margin-bottom: 0px;font-size: 16px;letter-spacing: 0.578px;white-space: normal;caret-color: rgba(0, 0, 0, 0);\">\n<section>\n<section style=\"margin-top: 0.5em;\">\n<section style=\"padding: 0.5em;border-width: 1px;border-style: solid;box-shadow: rgb(226, 226, 226) 0px 16px 1px -13px;border-color: rgb(0, 150, 136);\">\n<section style=\"text-align: left;\">\n<section style=\"color: rgb(255, 129, 36);text-align: justify;\">\n<section style=\"margin-bottom: 8px;\">\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\">\u70b9\u51fb<strong><span style=\"color: rgb(0, 150, 136);\">\u201c\u9605\u8bfb\u539f\u6587\u201d<\/span><\/strong>\u7acb\u523b\u62e5\u6709<\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"margin-bottom: 8px;font-size: 32px;color: rgb(0, 150, 136);\">\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\">\u2193\u2193\u2193&nbsp;<\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<p><\/content>\n<\/div>\n<p><\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ggpubr\u5168\u80fd\u4f5c\u56fe\u5305 \u539f\u521b&nbsp;&nbsp;\u5c0f\u4e91&nbsp;&nbsp;\u751f\u4fe1\u679c&nbsp;&nbsp; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/59246"}],"collection":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=59246"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/59246\/revisions"}],"predecessor-version":[{"id":59259,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/59246\/revisions\/59259"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=59246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=59246"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=59246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}