Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

xgx_scale_y_log10

log10 scales the y axis with a "pretty" set of breaks


Description

xgx_scale_y_log10 is similar to scale_y_log10. But it uses what we believe to be a nicer spacing and set of tick marks it can be used the same as scale_y_log10

Usage

xgx_scale_y_log10(
  breaks = xgx_breaks_log10,
  minor_breaks = NULL,
  labels = xgx_labels_log10,
  ...
)

Arguments

breaks

major breaks, default is a function defined here

minor_breaks

minor breaks, default is a function defined here

labels

function for setting the labels, defined here

...

other arguments passed to scale_y_log10

Value

ggplot2 compatible scale object

Examples

conc <- 10^(seq(-3, 3, by = 0.1))
ec50 <- 1
data <- data.frame(concentration = conc, 
                   bound_receptor = 1 * conc / (conc + ec50))
ggplot2::ggplot(data, ggplot2::aes(y = concentration, x = bound_receptor)) +
  ggplot2::geom_point() +
  ggplot2::geom_line() +
  xgx_scale_y_log10() +
  xgx_scale_x_reverselog10()

xgxr

Exploratory Graphics for Pharmacometrics

v1.1.1
MIT + file LICENSE
Authors
Andrew Stein [aut, cre], Alison Margolskee [aut], Fariba Khanshan [aut], Konstantin Krismer [aut] (<https://orcid.org/0000-0001-8994-3416>), Matthew Fidler [ctb] (<https://orcid.org/0000-0001-8538-6691>), Novartis Pharma AG [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.