In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "how to draw 24-hour dynamic blood glucose map with R language visualization ggplot2". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "R language visualization ggplot2 how to draw 24-hour dynamic blood glucose map" can help you solve the problem.
Data format sample=read.csv ("sample.csv", header = Theme stringsAsFactors = F) head (sample)
The method of creating equidistant time series (minutes) time=strptime ("00:00:00", "% H:%M:%S") + 300000breaks 287 # when there is no date, the default date is today's drawing code # time must first be converted to POSIXct format, like the following breaks, geom_datetime accepts only POSIXct format. Sample$time=as.POSIXct (sample$time) # breaks are customized Any time point can be chosen by ggplot (sample,aes (X-ray timekeeper lucky Group1) + geom_line () + scale_x_datetime (limits = c (as.POSIXct ("2020-03-24 00:00:00 CST"), as.POSIXct ("2020-03-24 23:59:59 CST"), breaks = c (as.POSIXct ("2020-03-24 00:00:00 CST"), as.POSIXct ("2020-03-24 04:00:00 CST"). As.POSIXct ("2020-03-24 07:00:00 CST"), as.POSIXct ("2020-03-24 12:00:00 CST"), as.POSIXct ("2020-03-24 18:00:00 CST"), as.POSIXct ("2020-03-24 22:00:00 CST"), labels = c ("00:00", "04:00", "07:00", "12:00", "18:00" "22:00") + scale_y_continuous (breaks = c, labels = c) + theme_bw () + theme (axis.text = element_text (size=16)) Axis.title = element_text (size=24)) # size of axis label + geom_hline (yintercept = c (6.1)) # add a horizontal line 6.1 is a high value of normal blood glucose.
This is the end of the introduction of "how to draw 24-hour dynamic blood glucose map with R language visualization ggplot2". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.