markmapOption: Theme options for markmap creation

Description Usage Arguments Details See Also Examples

View source: R/individual.R

Description

Theme options for markmap creation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
markmapOption(
  preset = NULL,
  nodeHeight = 20,
  nodeWidth = 180,
  spacingVertical = 10,
  spacingHorizontal = 120,
  duration = 750,
  layout = "tree",
  color = "gray",
  linkShape = "diagonal",
  renderer = "boxed",
  ...
)

Arguments

preset

the name of built-in theme for markmap. If present, any other parameters will be ignored.

nodeHeight

the height of nodes in the markmap.

nodeWidth

the width of nodes in the markmap.

spacingVertical

space of vertical.

spacingHorizontal

space of horizontal.

duration

duration time for animation.

layout

layout mode of markmap. Currently, only 'tree' is accepted.

color

color of markmap. A character color value ,either 'gray' or a categorical colors including 'category10','category20','category20b' and 'category20c'.

linkShape

link shape of markmap. A character value, either 'diagonal' or 'bracket'.

renderer

rendered shaped of markmap. A character value ,either 'basic' or 'boxed'.

...

other options.

Details

This function is adapted from the Rmarkup package.

Currently, markmap have 'default' and 'colorful' themes. colorful' themes have three different parameters from default themes: nodeHeight: 10, renderer: 'basic',color: 'category20'

See Also

https://github.com/seifer08ms/Rmarkmap and https://github.com/dundalek/markmap/blob/master/lib/view.mindmap.js for details.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
input <- system.file("examples/mindr-md.Rmd", package = "mindr")
# file.show(input)
input_txt <- readLines(input, encoding = "UTF-8")
markmap(input_txt)
markmap(input_txt, widget_options = markmapOption(preset = "default"))
markmap(input_txt, widget_options = markmapOption(color = "category20b",
    linkShape = "bracket"))
markmap(input_txt, widget_options = markmapOption(color = "category10",
    linkShape = "diagonal", renderer = "basic"))
markmap(input_txt, widget_options = markmapOption(nodeHeight = 30, nodeWidth = 100,
    spacingHorizontal = 60))

mindr documentation built on Nov. 22, 2021, 9:07 a.m.

Related to markmapOption in mindr...