Skip to content

MIC plot theme #98

Answered by msberends
theanita1 asked this question in Q&A
Mar 3, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Ahhh, but that's not ggplot 😉 That's base R.

I wrote something to get to similar results in ggplot for you:

ggplot2::autoplot(random_mic(100),
                  mo = "Escherichia coli",
                  ab = "ampicillin",
                  guideline = "EUCAST 2021") +
  # here starts the theme part
  ggplot2::theme_minimal() + 
  ggplot2::theme(panel.grid = ggplot2::element_blank(), 
                 axis.line.y = ggplot2::element_line(linewidth = 0.25), 
                 legend.position = "top")

Or you could create your own function to reduce code:

our_theme <- function(...) {
  ggplot2::theme_minimal() + 
    ggplot2::theme(panel.grid = ggplot2::element_blank(), 
                   ax…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@theanita1
Comment options

@msberends
Comment options

Answer selected by theanita1
@theanita1
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants