% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_smr.R
\name{plot_smr}
\alias{plot_smr}
\title{Plot summary data}
\usage{
plot_smr(
  data,
  type = NULL,
  x = NULL,
  y = NULL,
  group = NULL,
  xlab = NULL,
  ylab = NULL,
  glab = NULL,
  ylimits = NULL,
  xrotation = c(0, 0.5, 0.5),
  xtext = NULL,
  gtext = NULL,
  legend = "top",
  sig = NULL,
  sigsize = 3,
  error = NULL,
  color = TRUE,
  opt = NULL
)
}
\arguments{
\item{data}{Output from summary data}

\item{type}{Type of graphic. "bar" or "line"}

\item{x}{Axis x variable}

\item{y}{Axis y variable}

\item{group}{Group variable}

\item{xlab}{Title for the axis x}

\item{ylab}{Title for the axis y}

\item{glab}{Title for the legend}

\item{ylimits}{limits of the y axis c(initial, end, brakes)}

\item{xrotation}{Rotation in x axis c(angle, h, v)}

\item{xtext}{Text labels in x axis using a vector}

\item{gtext}{Text labels in group using a vector}

\item{legend}{the position of legends ("none", "left", "right", "bottom",
"top", or two-element numeric vector)}

\item{sig}{Column with the significance}

\item{sigsize}{Font size in significance letters}

\item{error}{Show the error bar ("ste" or "std")}

\item{color}{colored figure (TRUE), black & white (FALSE) or color vector}

\item{opt}{Add news layer to the plot}
}
\value{
plot
}
\description{
Graph summary data into bar o line plot
}
\details{
If the table is a out put of \code{mean_comparison(graph_opts = TRUE)}
function. Its contain all the parameter for the plot.

You could add additional layer to the plot using "+" with ggplot2 options
}
\examples{

\dontrun{

library(inti)

fb <- potato#' 

yrs <- yupana_analysis(data = fb
                       , response = "hi"
                       , model_factors = "geno*treat"
                       , comparison = c("geno", "treat")
                       )

yrs$meancomp \%>\% 
  plot_smr(type = "line"
           , x = "geno"
           , y = "hi"
           , xlab = ""
           , group = "treat"
           , glab = "Tratamientos"
           , ylimits = c(0, 1, 0.2)
           , color = c("red", "black")
           , gtext = c("Irrigado", "Sequia")
           )
           
}

}
