Learn R Programming

Hmisc (version 5.3-0)

plotlyParm: Parameters for Plotly Graphics

Description

plotlyParm is a list of functions useful for specifying parameters to plotly graphics, such as chart heights, colors, and margins.

Usage

plotlyParm

Arguments

Format

A list of functions:

  • heightDotchart(rows, per=25, low=200, high=800): computes the needed height in pixels for a plotly dot chart given the number of rows in the chart.

  • heightDotchartb(x, per=40, low, high=1700): given a vector of row labels that appear to the left on a dot chart, computes the needed chart height, taking label line breaks into account. Since plotly devotes the same vertical space to each category, this only needs to find the maximum number of breaks present.

  • colUnorder(n=5, col=colorspace::rainbow_hcl): colors for unordered categories.

  • colOrdered(n=5, col=viridisLite::viridis): colors for ordered levels.

  • lrmargin(x, wmax=190, mult=7): margin to leave enough room for long labels on the left or right, as in dot charts.