Learn R Programming

aclhs (version 1.0.1)

aclhs.plot_sampling_distribution: Plots the acLHS samples distribution.

Description

Plots the acLHS sample distribution for either 1D or 2D data. acLHS samples will be overlayed over the original data points in blue.

Usage

aclhs.plot_sampling_distribution(df, aclhs_samples, plot_params)

Value

No return value, called for side effects

Arguments

df

The original data in dataframe format

aclhs_samples

The acLHS-derived sample indices

plot_params

The plotting parameters to use

Examples

Run this code
## Get the data of interest and get the acLHS sample indices
data(ex_data_2D)
input2D <- ex_data_2D
aclhs_sam <- aclhs(df=input2D, num_samples=50, weights=c(1,1,1), iter=100)

## Set plotting parameters
p_params <- aclhs.plot_params(file_name=tempfile(fileext=".png"),
                              xlab=expression(bold("X [km]")),
                              ylab=expression(bold("Y [km]")))

## Create plot
aclhs.plot_sampling_distribution(df=input2D, aclhs_samples=aclhs_sam,
                                 plot_params=p_params)

Run the code above in your browser using DataLab