plotly_npEM | R Documentation |
This is an updater version of plot.npEM
function by using plotly
. For technical details, please refer to plot.npEM
.
plotly_npEM(x, blocks = NULL, hist=TRUE, addlegend=TRUE, scale = TRUE, title=NULL, breaks="Sturges", dens.col = NULL, newplot=TRUE, ylim = NULL , col.hist = "#1f77b4", width = 3, title.x = 0.5 , title.y = 0.95, title.size = 15, xlab = "X" , xlab.size = 15 , xtick.size = 15, ylab = "Density" , ylab.size = 15 , ytick.size = 15, legend.text = "Posteriors", legend.text.size = 15, legend.size = 15) plotly_spEM(x, blocks = NULL, hist=TRUE, addlegend=TRUE, scale = TRUE, title=NULL, breaks="Sturges", dens.col = NULL, newplot=TRUE, ylim = NULL , col.hist = "#1f77b4", width = 3, title.x = 0.5 , title.y = 0.95, title.size = 15, xlab = "X" , xlab.size = 15 , xtick.size = 15, ylab = "Density" , ylab.size = 15 , ytick.size = 15, legend.text = "Posteriors", legend.text.size = 15, legend.size = 15)
x |
An object of class |
blocks |
Blocks (of repeated measures coordinates) to plot; not relevant for univariate case. Default is to plot all blocks. |
hist |
If TRUE, superimpose density estimate plots on a histogram of the data |
addlegend |
If TRUE, adds legend to the plot. |
scale |
If TRUE, scale each density estimate by its corresponding estimated mixing proportion, so that the total area under all densities equals 1 and the densities plotted may be added to produce an estimate of the mixture density. When FALSE, each density curve has area 1 in the plot. |
title |
Alternative vector of main titles for plots (recycled as many times as needed) |
breaks |
Passed directly to the |
ylim |
|
dens.col |
Color values to use for the individual component density
functions, repeated as necessary. Default value is |
newplot |
If TRUE, creates a new plot. |
col.hist |
Color of the histogram to plot. |
width |
Line width. |
title.size |
Size of the main title. |
title.x |
Horsizontal position of the main title. |
title.y |
Vertical posotion of the main title. |
xlab |
Label of X-axis. |
xlab.size |
Size of the lable of X-axis. |
xtick.size |
Size of tick lables of X-axis. |
ylab |
Label of Y-axis. |
ylab.size |
Size of the lable of Y-axis. |
ytick.size |
Size of tick lables of Y-axis. |
legend.text |
Title of legend. |
legend.text.size |
Size of the legend title. |
legend.size |
Size of legend. |
plotly_npEM
returns a list with two elements:
x |
List of matrices. The jth column of the ith matrix is the vector of x-values for the jth density in the ith plot. |
y |
y-values, given in the same form as the x-values. |
npEM
, density.npEM
, spEMsymloc
,
plotseq.npEM
, plot.npEM
## Not run: ## Examine and plot water-level task data set. ## First, try a 3-component solution where no two coordinates are ## assumed i.d. data(Waterdata) set.seed(100) a <- npEM(Waterdata[,3:10], 3, bw=4) plotly_npEM(a , newplot = FALSE) ## Next, same thing but pairing clock angles that are directly opposite one ## another (1:00 with 7:00, 2:00 with 8:00, etc.) b <- npEM(Waterdata[,3:10], 3, blockid=c(4,3,2,1,3,4,1,2), bw=4) plotly_npEM(b , newplot = FALSE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.