Learn R Programming

profExtrema (version 0.2.1)

setPlotOptions: Set-up the plot options when NULL

Description

Function to set-up plot options for plot_univariate_profiles_UQ, plotBivariateProfiles, coordinateProfiles, coordProf_UQ, obliqueProfiles and obliqueProf_UQ.

Usage

setPlotOptions(plot_options = NULL, d, num_T, kmModel = NULL)

Arguments

plot_options

the list of plot options to set-up

d

number of coordinates

num_T

number of thresholds of interest

kmModel

a km model, used to obtain the coordinates names.

Value

the properly set-up list containing the following fields

  • save:boolean, if TRUE saves the plots in folderPlots

  • folderPlots:a string containing the destination folder for plots, if save==TRUE default is ./

  • ylim:a matrix coordx2 containing the ylim for each coordinate, if NULL in plot_options this is left NULL and automatically set at the plot time.

  • titleProf:a string containing the title for the coordinate profile plots, default is "Coordinate profiles"

  • title2d:a string containing the title for the 2d plots (if the input is 2d), default is "Posterior mean"

  • design:a \(dxr\) matrix where \(d\) is the input dimension and \(r\) is the size of the discretization for plots at each dimension

  • coord_names:a \(d\)-vector of characters naming the dimensions. If NULL and kmModel not NULL then it is the names of kmModel@X otherwise x_1,...,x_d

  • id_save:a string to be added to the plot file names, useful for serial computations on HPC, left as in plot_options.

  • qq_fill:if TRUE it fills the region between the first 2 quantiles in quantiles_uq and between the upper and lower bound in objectUQ$bound$bound, if NULL, it is set as FALSE.

  • bound_cols:a vector of two strings containing the names of the colors for upper and lower bound plots.

  • qq_fill_colors:a list containing the colors for qq_fill: approx for 2 quantiles, bound_min for bounds on the profile inf, bound_max for profile sup. Initialized only if qq_fill==TRUE.

  • col_CCPthresh_nev:Color palette of dimension num_T for the colors of the vertical lines delimiting the intersections between the profiles sup and the thresholds

  • col_CCPthresh_alw:Color palette of dimension num_T for the colors of the vertical lines delimiting the intersections between the profiles inf and the thresholds

  • col_thresh:Color palette of dimension num_T for the colors of the thresholds

  • fun_evals:integer denoting the level of plot for the true evaluations.

    • 0: default, no plots for true evaluations;

    • 1: plot the true evaluations as points in 2d plots, no true evaluation plots in 1d;

    • 2: plot true evaluations, in 2d with different color for values above threshold;

    • 3: plot true evaluations, in 2d plots in color, with background of the image colored as proportion of points inside excursion;

if all the fields are already filled then returns plot_options