wplot: wplot

Description Usage Arguments Examples

Description

Create and save scatter 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. The .png version is not created, only the link is put in place. You can add 2D error bars around the dots, or add lines (ablines) to your plot, by setting "abline" argument to = F (no line, default), "h" (horizontal, further specified by a = y-offset), "v" (vertical, further specified by a = x-offset), "ab" (line with an angle, further specified by a = offset, b = slope).

Usage

1
2
3
4
5
6
7
wplot(df_2columns, col = 1, pch = 18, ..., panel_first = NULL,
  plotname = substitute(df_2columns), panel.first = grid(F), errorbar = F,
  upper = 0, lower = upper, left = 0, right = left, width = 0.1,
  arrow_lwd = 1, col_errorbar = 1, ylimm = F, xlimm = F, abline = c(F,
  "v", "h", "ab")[1], a = F, b = F, lty = 1, lwd = 1, col_abline = 1,
  equal.axes = F, savefile = UnlessSpec("b.save.wplots"),
  mdlink = ww.set.mdlink(), w = UnlessSpec("b.defSize", 7), h = w)

Arguments

col

Color of the plot.

pch

Define the symbol for each data point. A number [0-25] or any string between ""-s.

...

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

panel_first

add a background grid by specifying " panel_first = grid() "

plotname

Title of the plot (main parameter) and also the name of the file.

panel.first

Draw a background grid similar as in ggplot2. Set to "panel.first=grid()" to draw an auto-fitted grid, (nx=NULL, ny=0) to draw vertical only, etc.

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.

left

Size of the left error bar.

right

Size of the right error bar. By default, it equals the left error bar.

arrow_lwd

Line width for the error bar arrow. Line width for the error bar arrow.

col_errorbar

Color of the error bar arrow.

ylimm

manual Y-limits error bar

xlimm

manual X-limits error bar

abline

Draw a line on the plot. Any value from: c( 'v', 'h', 'ab') for vertical, horizontal, and line with any slope. In each case you need to specify "a=", specifying the X-position for vertical (v); the Y-position for horizontal (yh) lines and the intercept for lines with a slope (ab). In the latter case, 'b' specifes the slope.

a

X-offset for vertical lines, Y-offset for horizontal, and inclined lines.

b

Slope of an inclined line.

lty

Linetype, defined by numbers 1-6.

lwd

Line width. Set to 2 by default.

col_abline

Color of the line.

equal.axes

Span of axes is set to equal (maximum range in either X or Y).

savefile

Save plot as pdf in OutDir, TRUE by default.

mdlink

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

w

Width of the saved pdf image, in inches.

h

Height of the saved pdf image, in inches.

df

Input data frame to be plotted_2columns

Examples

1
wplot (df_2columns =  , col = 1, pch = 18, ... =  , w = 7, h = w, plotname = substitute(df_2columns), mdlink = F, errorbar = F, upper = 0, lower = upper, left = 0, right = left, width = 0.1, arrow_lwd = 1, abline = F, a = F, b = F, lty = 1, lwd = 1, col_abline = 1)

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