ACplot_curves: Plot curves

View source: R/ACutils_export.R

ACplot_curvesR Documentation

Plot curves

Description

\loadmathjax

This functions gets one or two dataset representig functional data and plot them. It does not smooth the curves, indeed it requires as input the data, not the regression coefficients. Use smooth_curves function for that.

Usage

ACplot_curves(
  data1,
  data2 = NULL,
  range,
  n_plot = 1,
  grid_points = NULL,
  internal_knots = NULL,
  highlight_band1 = NULL,
  highlight_band2 = NULL,
  main = "Curves",
  xtitle = " ",
  ytitle = " ",
  legend_name1 = "data1",
  legend_name2 = "data2"
)

Arguments

data1

matrix of dimension \mjseqnn\_curves \times n\_grid\_points representing the first functional dataset to be plotted.

data2

matrix of dimension \mjseqnn\_curves \times n\_grid\_points representing the second dataset to be plotted, if needed.

range

the range where the curves has to be plotted. Not needed if n_plot is 0.

n_plot

the number of curves to be plotted. Set 0 for no plot.

grid_points

vector of size \mjseqnn\_grid\_points with the points where the splines are evaluated. If defaulted they are uniformly generated. Not needed if n_plot is 0.

internal_knots

vector with the internal knots used to construct the splines. Default is null. If provided, n_basis are displayed in the plot. The k-th interval represents the segment where the k-th spline dominates the others.

highlight_band1

a vector that states if a particular band of the plot has to be highlighted. It has to be a vector within the range \mjseqn[1,n\_basis].

highlight_band2

a vector that states if a particular band of the plot has to be highlighted. It has to be a vector within the range \mjseqn[1,n\_basis].

main

the title of the plot.

xtitle

the title of the x-axis.

ytitle

the title of the x-axis.

legend_name1

the name for data1 to be printed in the legend.

legend_name2

the name for data2 to be printed in the legend. Used only is two datasets are actually plotted.

Value

No values are returned.


alessandrocolombi/ACutils documentation built on March 3, 2023, 4:06 a.m.