wlegend.label: wlegend.label

Description Usage Arguments Examples

View source: R/MarkdownReportsDev.R

Description

Quickly add a "text only" legend without a filled color box. to an existing plot, and save the plot immediately. Never inserts an mdlink.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
wlegend.label(
  legend = "...",
  poz = 1,
  cex = 1,
  bty = "n",
  ...,
  w = 7,
  h = w,
  title = NULL,
  ttl.by.varname = FALSE,
  OverwritePrevPDF = unless.specified("b.save.wplots"),
  mdlink = FALSE
)

Arguments

legend

Labels displayed (Text)

poz

Position of the legend (def: 4). Use numbers 1-4 to choose from "topleft", "topright", "bottomright", "bottomleft".

cex

font size

bty

The type of box to be drawn around the legend. The allowed values are "o" (the default) and "n".

...

Additional parameters for legend()

w

Width of the saved pdf image, in inches.

h

Height of the saved pdf image, in inches.

title

What should be the title of the legend? NULL by default

ttl.by.varname

Should the title of the legend substituted from the NamedColorVec variable's name? FALSE by default. Does not work if you pass on a list item like this: list$element

OverwritePrevPDF

Save the plot immediately with the same name the last wplot* function made (It is stored in plotnameLastPlot variable).

mdlink

Insert a .pdf and a .png image link in the markdown report, set by "path_of_report".

Examples

1
2
x = cbind(a = rnorm(1:10), b = rnorm(10)); wplot(x);
wlegend.label(legend = "Hey", poz = 2,  w = 7, bty = "n", OverwritePrevPDF = TRUE)

vertesy/MarkdownReportsDev documentation built on Nov. 15, 2021, 9:59 a.m.