% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/design_mytheme.R
\name{design_mytheme}
\alias{design_mytheme}
\title{Design Custom Theme for ggplot2 Plots}
\usage{
design_mytheme(
  theme = c("light", "bw", "classic", "classic2"),
  plot_title_size = 2,
  axis_title_size = 2,
  axis_text_size = 12,
  axis_angle = 60,
  hjust = 1,
  legend.position = "bottom",
  legend.direction = "horizontal",
  legend.size = 0.25,
  legend.key.height = 0.5,
  legend.key.width = 0.5,
  legend.size.text = 10,
  legend.box = "horizontal"
)
}
\arguments{
\item{theme}{Base theme: "light", "bw", "classic", "classic2".
Default is "light".}

\item{plot_title_size}{Relative size of plot title. Default is 2.}

\item{axis_title_size}{Relative size of axis titles. Default is 2.}

\item{axis_text_size}{Size of axis tick labels. Default is 12.}

\item{axis_angle}{Angle of x-axis tick labels. Default is 60.}

\item{hjust}{Horizontal justification for x-axis text. Default is 1.}

\item{legend.position}{Legend position: "none", "left", "right", "bottom",
"top". Default is "bottom".}

\item{legend.direction}{Direction of legend items: "horizontal" or "vertical".
Default is "horizontal".}

\item{legend.size}{Size of legend key. Default is 0.25.}

\item{legend.key.height}{Height of legend key in cm. Default is 0.5.}

\item{legend.key.width}{Width of legend key in cm. Default is 0.5.}

\item{legend.size.text}{Size of legend text labels. Default is 10.}

\item{legend.box}{Orientation of legend box: "horizontal" or "vertical".
Default is "horizontal".}
}
\value{
A ggplot2 theme object.
}
\description{
Creates a customized ggplot2 theme based on user-specified parameters for
plot elements such as title size, axis sizes, legend settings, and theme style.
Supports various base themes and allows fine-tuning of visual aspects.
}
\examples{
library(ggplot2)
p <- ggplot(mtcars, aes(wt, mpg)) +
  geom_point()
mytheme <- design_mytheme(theme = "bw", plot_title_size = 1.5, axis_text_size = 14)
p + mytheme + ggtitle("Example Plot")
}
\author{
Dongqiang Zeng
}
