BP_Scatter: BP_Scatter

View source: R/BP_Scatter.R

BP_ScatterR Documentation

BP_Scatter

Description

Produces a scatter plot and return parameters for easy replotting when zooming for example.

Usage

BP_Scatter(
  ax1,
  ax2,
  labs = list("X", "Y"),
  titre = "",
  xlimits = NULL,
  ylimits = NULL,
  colorby = rep(2, length(ax1)),
  pt.label = NULL
)

Arguments

ax1

vector of values on the horizontal axis

ax2

vector of values on the vertical axis

labs

2 element list giving x and y axis labels respectively

titre

main figure title

xlimits

minimum and maximum values for the horizontal axis

ylimits

minimum and maximum values for the vertical axis

colorby

class for color coding of points. Default is all blue. When default, no legend is plotted.

pt.label

label for points. NA is used to skip a labels.

Value

A list with the following elements:

  • Xsc,Ysc : x and y values of all scores plotted.

  • labs : 2 element list giving x and y axis labels respectively

  • titre : main figure title

  • X_Lim, Y_Lim : xlim and ylim of current plot.

  • colorby : class for color coding of points.

  • pt.label : label for points. NA is used to skip a labels.

Examples

BP_Scatter(ax1=c(rnorm(20,10,2),rnorm(20,20,3)), ax2=rnorm(40,5,3),
                labs=list("X-axis","Y-axis"),
                titre = "A scatter plot",
                xlimits=c(5,30), ylimits=c(2,8),
                colorby=as.factor(c(rep("Cl1",20),rep("Cl2",20))))
                

PannetonB/inspectrar documentation built on Feb. 4, 2023, 1:57 p.m.