wbarplot: wbarplot

Description Usage Arguments Examples

Description

Create and save bar plots as .pdf, in "OutDir". If mdlink =T, it inserts a .pdf and a .png link in the markdown report, set by "path_of_report". The .png version is not created, only the link is put in place, not to overwrite previous versions.

Usage

1
2
3
4
5
6
7
wbarplot(variable, ..., col = "gold1", sub = F,
  plotname = substitute(variable), main = plotname, tilted_text = F,
  ylimits = NULL, hline = F, vline = F, filtercol = 1, lty = 1,
  lwd = 2, lcol = 2, errorbar = F, upper = 0, lower = upper,
  arrow_width = 0.1, arrow_lwd = 1,
  savefile = UnlessSpec("b.save.wplots"), w = UnlessSpec("b.defSize", 7),
  h = w, incrBottMarginBy = 0, mdlink = ww.set.mdlink())

Arguments

variable

The variable to plot.

...

Pass any other parameter of the corresponding plotting function (most of them should work).

col

Color of the plot.

sub

Subtitle below the plot.

plotname

The name of the file saved.

main

The title of the plot.

tilted_text

Use 45 degree x-labels if TRUE. Useful for long, but not too many labels.

ylimits

Defines the Y axis range. Replacement for the standard "ylim" argument.

hline

Draw a horizontal line at the value you pass on to it. Useful to display a threshold. Design the line by "lty", "lwd" & "lcol" parameters.

vline

Draw a vertical line at the value you pass on to it. Useful to display a threshold. Design the line by "lty", "lwd" & "lcol" parameters.

filtercol

Color bars below / above the threshold with red / green. Define the direction by -1 or 1. Takes effect if "hline" is defined.

lty

Linetype, defined by numbers 1-6.

lwd

Linewidth. Set to 2 by default.

lcol

Color of the line.

errorbar

Draw error bars if TRUE. Pass on the value in parameters "upper" and "lower". Refine the look by "w" and "arrow_lwd".

upper

Size of the upper error bar.

lower

Size of the lower error bar. By default, it equals the upper error bar.

arrow_width

Width of the arrow head.

arrow_lwd

Line width for the error bars.

savefile

Save plot as pdf in OutDir, TRUE by default.

w

Width of the saved pdf image, in inches.

h

Height of the saved pdf image, in inches.

incrBottMarginBy

Increase the blank space at the bottom of the plot. Use if labels do not fit on the plot.

mdlink

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

Examples

1
wbarplot (variable =  , ... =  , col = gold1, sub = F, plotname = substitute(variable), main = substitute(variable), w = 7, h = w, incrBottMarginBy = 0, mdlink = F, tilted_text = F, hline = F, vline = F, filtercol = 1, lty = 1, lwd = 2, lcol = 2, errorbar = F, upper = 0, lower = upper, arrow_width = 0.1, arrow_lwd = 1)

vertesy/MarkdownReports.v2.9.5 documentation built on May 22, 2019, 4 p.m.