Skip to content

Fix barplot axis window/panel margin and labels. #109

@grabear

Description

@grabear

From

MicrobiomeR/R/barplot.R

Lines 99 to 106 in dfc8f67

# Create the theme
p <- p + ggplot2::ylab("Relative Abundance (% 100)") + ggplot2::scale_fill_manual(values = palette_values) + ggplot2::theme(
text = ggplot2::element_text(size = 11, face = "bold"),
axis.text.x = ggplot2::element_blank(), axis.ticks = ggplot2::element_blank(), panel.grid.major = ggplot2::element_blank(), panel.grid.minor = ggplot2::element_blank(),
strip.background = ggplot2::element_rect(fill = "white"), strip.text = ggplot2::element_text(colour = "black"), panel.background = ggplot2::element_blank()
) +
ggplot2::xlab(xlabel) +
ggplot2::scale_y_continuous(breaks = scales::pretty_breaks(n = 4))

The axis.text.x = ggplot2::element_blank(), part can be removed and expand = c(0,0) can be added to scale_y_continuous for formatting the axis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions