{"id":477,"date":"2023-06-21T10:54:48","date_gmt":"2023-06-21T10:54:48","guid":{"rendered":"https:\/\/yunshangtulv.com.cn\/?p=477"},"modified":"2023-06-21T10:54:48","modified_gmt":"2023-06-21T10:54:48","slug":"sci%e5%9b%be%e7%89%87%e5%a4%8d%e7%8e%b0%ef%bc%9a%e8%8a%b1%e7%93%a3%e5%9b%be","status":"publish","type":"post","link":"https:\/\/yunshangtulv.com.cn\/?p=477","title":{"rendered":"SCI\u56fe\u7247\u590d\u73b0\uff1a\u82b1\u74e3\u56fe"},"content":{"rendered":"<p><span>\u9996\u5148\uff0c\u6211\u5c06\u751f\u6210\u4e00\u4e2a\u6570\u636e\u6846\uff0c\u5e76\u663e\u793a\u524d\u51e0\u884c\u3002<\/span><\/p>\n<pre class=\"corepress-code-pre\"><code># \u5047\u8bbe\u6570\u636e\u9700\u8981\u6709\u4e09\u4e2a\u5b57\u6bb5\uff1acase_id\uff0cKRAS_VAF\uff0c\u548cgroup\r\ncase_id &lt;- seq(1, 34)\r\nKRAS_VAF &lt;- runif(34, min = 0.1, max = 1)\r\ngroup &lt;- sample(c(\"#B84D64\",\"#3D6AAA\",\"#EE7072\",\"tan1\",\"#394D9B\"), size = 34, replace = TRUE)\r\n\r\nA &lt;- data.frame(case_id, KRAS_VAF, group)\r\n\r\n# \u6253\u5370\u6570\u636e\u7684\u524d\u51e0\u884c\r\nhead(A)\r\n<\/code><\/pre>\n<p><span>\u63a5\u7740\uff0c\u6211\u4eec\u6765\u4fee\u6539\u4ee3\u7801\u4ee5\u9002\u5e94\u65b0\u751f\u6210\u7684\u6570\u636e\uff0c\u5e76\u5bf9\u6bcf\u4e00\u884c\u8fdb\u884c\u89e3\u91ca\uff1a<\/span><\/p>\n<pre class=\"corepress-code-pre\"><code># Load the required library\r\nlibrary(ggplot2)\r\n\r\n# Begin the plot\r\np &lt;- ggplot(A,aes(x=case_id, y=KRAS_VAF)) +\r\n  # Add a bar plot layer\r\n  geom_col(aes(fill=group),show.legend = FALSE, color='black') +\r\n  # Convert the plot to polar coordinates\r\n  coord_polar(direction = 1) +\r\n  # Set the theme to black and white\r\n  theme_bw() +\r\n  # Remove unnecessary elements from the theme\r\n  theme(axis.text.y = element_blank(),\r\n        axis.ticks = element_blank(),\r\n        panel.border = element_blank(),\r\n        axis.title = element_blank(),\r\n        axis.text.x = element_text(colour = 'black',size = 8),\r\n        panel.grid = element_line(colour = 'black')) +\r\n  # Set custom fill colors\r\n  scale_fill_manual(values = c( \"#B84D64\",\"#3D6AAA\",\"#EE7072\",\"tan1\",\"#394D9B\"))\r\n\r\n# Display the plot\r\nprint(p)\r\n<\/code><\/pre>\n<p><span>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u5bf9\u56fe\u5f62\u8fdb\u884c\u4f18\u5316\uff0c\u4ee5\u589e\u52a0\u89c6\u89c9\u5438\u5f15\u529b\uff1a<\/span><\/p>\n<pre class=\"corepress-code-pre\"><code>p &lt;- p +\r\n  # Add a title\r\n  ggtitle(\"Enhanced Polar Bar Chart\") +\r\n  # Improve theme\r\n  theme(\r\n    plot.title = element_text(hjust = 0.5, size = 14, face = \"bold\", color = \"darkblue\"),\r\n    panel.background = element_rect(fill = \"lightgrey\"),\r\n    axis.text.x = element_text(color = \"darkred\", size = 10)\r\n  )\r\n\r\nprint(p)\r\n<\/code><\/pre>\n<p><span>\u7136\u540e\uff0c\u6211\u4eec\u5c06\u7ed3\u679c\u4fdd\u5b58\u4e3aPDF\u683c\u5f0f\u7684\u56fe\u50cf\uff0c\u6570\u636e\u4fdd\u5b58\u4e3aCSV\u683c\u5f0f\uff1a<\/span><\/p>\n<pre class=\"corepress-code-pre\"><code># Save the plot\r\nggsave(filename = \"polar_bar_chart.pdf\", plot = p)\r\n\r\n# Save the data\r\nwrite.csv(A, \"AABB.csv\", row.names = FALSE)\r\n<\/code><\/pre>\n<p>\u5bf9\u4e8e\u4f7f\u7528\u81ea\u5df1\u7684\u6570\u636e\uff0c\u6570\u636e\u8868\u5e94\u91c7\u7528\u4ee5\u4e0b\u683c\u5f0f\uff1a<\/p>\n<ul>\n<li>case_id: \u6574\u6570\uff0c\u8868\u793a\u6837\u672c\u7684\u552f\u4e00\u6807\u8bc6\u7b26<\/li>\n<li>KRAS_VAF: \u6570\u5b57\uff0c\u8868\u793a\u8981\u5728\u82b1\u74e3\u56fe\u4e2d\u8868\u793a\u7684\u6570\u503c<\/li>\n<li>group: \u5b57\u7b26\u4e32\uff0c\u8868\u793a\u6bcf\u4e2a\u6837\u672c\u6240\u5c5e\u7684\u7ec4\u522b\u3002\u6bcf\u4e2a\u7ec4\u522b\u5e94\u5bf9\u5e94\u4e00\u4e2a\u7279\u5b9a\u7684\u989c\u8272\u503c\u3002<\/li>\n<\/ul>\n<p>\u4e0b\u9762\u662f\u5b8c\u6574\u4ee3\u7801<\/p>\n<pre class=\"corepress-code-pre\"><code># Load the required library\r\nlibrary(ggplot2)\r\n\r\n# Generate the data\r\ncase_id &lt;- seq(1, 34)\r\nKRAS_VAF &lt;- runif(34, min = 0.1, max = 1)\r\ngroup &lt;- sample(c(\"#B84D64\",\"#3D6AAA\",\"#EE7072\",\"tan1\",\"#394D9B\"), size = 34, replace = TRUE)\r\n\r\nA &lt;- data.frame(case_id, KRAS_VAF, group)\r\n\r\n# Print the first few rows of the data\r\nprint(head(A))\r\n\r\n# Begin the plot\r\np &lt;- ggplot(A,aes(x=case_id, y=KRAS_VAF)) +\r\n  # Add a bar plot layer\r\n  geom_col(aes(fill=group),show.legend = FALSE, color='black') +\r\n  # Convert the plot to polar coordinates\r\n  coord_polar(direction = 1) +\r\n  # Set the theme to black and white\r\n  theme_bw() +\r\n  # Remove unnecessary elements from the theme\r\n  theme(axis.text.y = element_blank(),\r\n        axis.ticks = element_blank(),\r\n        panel.border = element_blank(),\r\n        axis.title = element_blank(),\r\n        axis.text.x = element_text(colour = 'black',size = 8),\r\n        panel.grid = element_line(colour = 'black')) +\r\n  # Set custom fill colors\r\n  scale_fill_manual(values = c( \"#B84D64\",\"#3D6AAA\",\"#EE7072\",\"tan1\",\"#394D9B\"))\r\n\r\n# Add enhancements to the plot\r\np &lt;- p +\r\n  # Add a title\r\n  ggtitle(\"Enhanced Polar Bar Chart\") +\r\n  # Improve theme\r\n  theme(\r\n    plot.title = element_text(hjust = 0.5, size = 14, face = \"bold\", color = \"darkblue\"),\r\n    panel.background = element_rect(fill = \"lightgrey\"),\r\n    axis.text.x = element_text(color = \"darkred\", size = 10)\r\n  )\r\n\r\n# Print the plot\r\nprint(p)\r\n\r\n# Save the plot\r\nggsave(filename = \"polar_bar_chart.pdf\", plot = p)\r\n\r\n# Save the data\r\nwrite.csv(A, \"AABB.csv\", row.names = FALSE)\r\n<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yunshangtulv.com.cn\/wp-content\/uploads\/2023\/06\/\u622a\u56fe_20230621171809-1.png\" alt=\"\" width=\"1008\" height=\"1008\" class=\"alignnone size-full wp-image-479\" srcset=\"https:\/\/yunshangtulv.com.cn\/wp-content\/uploads\/2023\/06\/\u622a\u56fe_20230621171809-1.png 1008w, https:\/\/yunshangtulv.com.cn\/wp-content\/uploads\/2023\/06\/\u622a\u56fe_20230621171809-1-300x300.png 300w, https:\/\/yunshangtulv.com.cn\/wp-content\/uploads\/2023\/06\/\u622a\u56fe_20230621171809-1-100x100.png 100w, https:\/\/yunshangtulv.com.cn\/wp-content\/uploads\/2023\/06\/\u622a\u56fe_20230621171809-1-600x600.png 600w, https:\/\/yunshangtulv.com.cn\/wp-content\/uploads\/2023\/06\/\u622a\u56fe_20230621171809-1-150x150.png 150w, https:\/\/yunshangtulv.com.cn\/wp-content\/uploads\/2023\/06\/\u622a\u56fe_20230621171809-1-768x768.png 768w\" sizes=\"auto, (max-width: 1008px) 100vw, 1008px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148\uff0c\u6211\u5c06\u751f\u6210\u4e00\u4e2a\u6570\u636e\u6846\uff0c\u5e76\u663e\u793a\u524d\u51e0\u884c\u3002 # \u5047\u8bbe\u6570\u636e\u9700\u8981\u6709\u4e09\u4e2a\u5b57\u6bb5\uff1acase_id\uff0cKRAS_VAF\uff0c\u548cgr [&hellip;]<\/p>\n","protected":false},"author":111,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-477","post","type-post","status-publish","format-standard","hentry","category-r"],"_links":{"self":[{"href":"https:\/\/yunshangtulv.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yunshangtulv.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yunshangtulv.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yunshangtulv.com.cn\/index.php?rest_route=\/wp\/v2\/users\/111"}],"replies":[{"embeddable":true,"href":"https:\/\/yunshangtulv.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=477"}],"version-history":[{"count":0,"href":"https:\/\/yunshangtulv.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/477\/revisions"}],"wp:attachment":[{"href":"https:\/\/yunshangtulv.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yunshangtulv.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yunshangtulv.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}