pyhlines: Plot horizontal lines using pyplot.hlines

Description Usage Arguments See Also Examples

Description

Plot horizontal lines using pyplot.hlines

Usage

1
2
pyhlines(y, xmin, xmax, colors = "k", linestyles = "solid", label = "",
  args = NULL, show = FALSE)

Arguments

y

numeric or a numeric vector with y-values for horizontal lines

xmin

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

xmax

numeric or a numeric vector of length(y) indicating upper x-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.hlines

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

pyvlines http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.hlines

Examples

1
2
pyhlines(1:10, 0, 10)
if (interactive()) pyshow()

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