pyvlines: Plot vertical lines using pyplot.vlines

Description Usage Arguments See Also Examples

Description

Plot vertical lines using pyplot.vlines

Usage

1
2
pyvlines(x, ymin, ymax, colors = "k", linestyles = "solid", label = "",
  args = NULL, show = FALSE)

Arguments

x

numeric or a numeric vector with x-values for vertical lines

ymin

numeric or a numeric vector of length(x) indicating lower y-values of the lines

ymax

numeric or a numeric vector of length(x) indicating upper y-values of the lines

colors

color of the line(s) (default: "k"), can be one of

  • single character for basic built-in matplotlib colors, see http://matplotlib.org/api/colors_api.html#module-matplotlib.colors

  • a numeric value between 0 and 1 as character, indicating gray shade, e.g. "0.75"

  • hex string, e.g. "#00ff00" for green

  • character string with HTML color name, e.g. "slateblue", see http://www.w3schools.com/html/html_colornames.asp

  • a character vector of length(x) containing a color specification as described above for each point separately

  • a numeric vector of length(x), where each numeric is used to map the according point to a colormap using the cmap, norm, vmin and vmax arguments

  • a numeric matrix with length(x) rows and three columns. Each row represents one point in x/y, the rows set values for RGB (red, green and blue, each between 0 and 1)

  • a numeric matrix with length(x) rows and four columns. Each row represents one point in x/y, the rows set values for RGBA (red, green, blue and alpha, each between 0 and 1)

label

character string

args

character string of further arguments passed to the **kwargs argument of matplotlib.pyplot.vlines

show

bool indicating whether to open a window with the plot

linestyle

character string or character vector of length(x) indicating the linestyle(s), using "solid" (default), "dashed", "dashdot" or "dotted"

See Also

pyhlines http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.vlines

Examples

1
2
3
pyvlines(c(1, 3, 5), 0, 10, colors = c("r", "g", "b"),
         linestyles = c("solid", "dashed", "dotted"))
if (interactive()) pyshow()

mpastell/Rpyplot documentation built on May 23, 2019, 6:27 a.m.