33 lines
899 B
R
33 lines
899 B
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/theme_visualizer_bar.R
|
|
\name{theme_visualizer_bar}
|
|
\alias{theme_visualizer_bar}
|
|
\title{Dynamic Theme for ggplot2}
|
|
\usage{
|
|
theme_visualizer_bar()
|
|
}
|
|
\value{
|
|
A ggproto object that applies a dynamic theme to a ggplot2 plot.
|
|
}
|
|
\description{
|
|
A dynamic theme that adjusts axis text styles based on whether the plot is flipped.
|
|
}
|
|
\details{
|
|
This function dynamically applies different axis text styles depending on
|
|
the coordinate system of the plot. If the plot is flipped (e.g., using
|
|
`coord_flip()`), the x-axis and y-axis text styles are adjusted accordingly.
|
|
}
|
|
\examples{
|
|
library(ggplot2)
|
|
|
|
# Example with a regular plot
|
|
p <- ggplot(mpg, aes(displ, hwy)) +
|
|
geom_col()
|
|
|
|
# Add the dynamic theme
|
|
p + theme_visualizer_bar()
|
|
|
|
# Add the dynamic theme with a flipped coordinate system
|
|
p + theme_visualizer_bar() + coord_flip()
|
|
|
|
}
|