Commit 10f5f6f6 authored by houyun's avatar houyun
Browse files

export latex_richtext()

parent f931dcef
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -92,6 +92,7 @@ export(grid.doughnut)
export(hyplot)
export(is_matrix_data)
export(is_md_tbl)
export(latex_richtext)
export(layout_tbl_graph_circular)
export(layout_with_circular)
export(make_cluster)
+4 −1
Original line number Diff line number Diff line
@@ -79,7 +79,10 @@ ggplot_add.magic_text <- function(object, plot, object_name) {
  ggplot_add(object, plot, object_name)
}

#' @noRd

#' @param x a character vector.
#' @rdname geom_magic_text
#' @export
latex_richtext <- function(x,
                           sup = "^",
                           sub = "_",
+5 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
% 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(
@@ -15,6 +16,8 @@ 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_()}.}
@@ -36,6 +39,8 @@ 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.