search for: major_breaks

Displaying 2 results from an estimated 2 matches for "major_breaks".

2025 Jan 21
1
ggplot with major and MINOR tick marks on a log scale
...lot # function in this StackOverflow post # https://stackoverflow.com/a/33179099/8245406 log10_minor_break = function (...){ function(x) { minx = floor(min(log10(x), na.rm=TRUE)) - 1 maxx = ceiling(max(log10(x), na.rm=TRUE)) + 1 n_major = maxx - minx + 1 major_breaks = seq(minx, maxx, by = 1) minor_breaks = rep(log10(seq(1, 9, by=1)), times = n_major) + rep(major_breaks, each = 9) return(10^(minor_breaks)) } } PopByDayByAQIminus %>% mutate(Day = factor(Day)) %>% ggplot( aes(x = AQI_Cat, y = TotalPop/1000000,...
2025 Jan 21
3
ggplot with major and MINOR tick marks on a log scale
I have used ggplot to create a graph on which the y-axis is on the log scale. (see data and code, below.) I would like to add minor tick marks, which will also be on the log scale. The data and code are below. I hope somone can tell me how I can modify the ggplot code so it produces minor tick marks on a log scale. Thank you, John ? PopByDayByAQIminus <- dget( structure(list(Day =