Commit 6887f1c4 authored by houyun's avatar houyun
Browse files

updates document

parent 10f5f6f6
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -79,9 +79,14 @@ ggplot_add.magic_text <- function(object, plot, object_name) {
  ggplot_add(object, plot, object_name)
}


#' @title Converts a LaTeX String to a Rich Text
#' @description Helper function to convert a LaTeX string to a rich text.
#' @param x a character vector.
#' @rdname geom_magic_text
#' @param sup one-length character, indicates that characters after this is superscript.
#' @param sub one-length character, indicates that characters after this is subscript.
#' @param br string,  separator of lines.
#' @rdname latex_richtext
#' @author Hou Yun
#' @export
latex_richtext <- function(x,
                           sup = "^",
@@ -157,4 +162,3 @@ end_bracket <- function(id, ll) {
}

+0 −5
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
% Please edit documentation in R/geom-magic-text.R
\name{geom_magic_text}
\alias{geom_magic_text}
\alias{latex_richtext}
\title{Magic Method to Draw labels}
\usage{
geom_magic_text(
@@ -16,8 +15,6 @@ geom_magic_text(
  br = "\\n",
  ...
)

latex_richtext(x, sup = "^", sub = "_", br = "\\n")
}
\arguments{
\item{mapping}{set of aesthetic mappings created by \code{aes()} or \code{aes_()}.}
@@ -39,8 +36,6 @@ call to a position adjustment function.}
\item{br}{string,  separator of lines.}

\item{...}{others passing to \code{ggtext::geom_richtext()}.}

\item{x}{a character vector.}
}
\value{
a gg layer object.

man/latex_richtext.Rd

0 → 100644
+23 −0
Original line number Diff line number Diff line
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-magic-text.R
\name{latex_richtext}
\alias{latex_richtext}
\title{Converts a LaTeX String to a Rich Text}
\usage{
latex_richtext(x, sup = "^", sub = "_", br = "\\n")
}
\arguments{
\item{x}{a character vector.}

\item{sup}{one-length character, indicates that characters after this is superscript.}

\item{sub}{one-length character, indicates that characters after this is subscript.}

\item{br}{string,  separator of lines.}
}
\description{
Helper function to convert a LaTeX string to a rich text.
}
\author{
Hou Yun
}