Skip to contents

Horizontal bar graphs made with coord_flip() require some changes to the theme() in order to look proper. This function wraps those changes up in a convenient function that should be appended at the end of the graph code, after theming functions such as theme_e61() have been called.

Usage

format_flip(x_adj = 0, y_top = TRUE)

Arguments

x_adj

Numeric. Adjusts the vertical position of the x-axis title, the default works for most graphs. A negative value moves the title up, a positive value moves the title down.

y_top

Logical. Defaults to TRUE. Set to FALSE to prevent y-axis label from being positioned in-line with the axis values. Only set this if you also set y_top = FALSE in theme_e61() and scale_y_continuous_e61().

Value

ggplot object