gg.sn-package: gg.sn

gg.sn-packageR Documentation

gg.sn

Description

The plotting methods of package sn, which are built on base R graphics, are superseded by alternative methods based on the package ggplot2.

Details

This package replaces the plotting methods of the package sn (which works with traditional base-type graphics) with alternative ones built on the package ggplot2. More precisely, the plotting methods of this package take precedence over those of sn, which remain in place. When the present package is launched, sn is loaded first, followed by gg.sn.

The plotting methods of package gg.sn and their arguments match those of sn, but the rendering is different, since the outcome is produced via the underlying package ggplot2. In some cases, arguments are there for compatibility with the original method in sn, but not actually used.

All the plotting methods of sn have their counterpart in gg.sn. Notice, however, that there is no counterpart of the sn function profile.selm, which actually can produce plots, but it does not constitute a plotting S4 method. Also note that sn::profile.selm is still declared to be at experimental stage and any matching function in gg.sn inherits this condition.

Author(s)

Adelchi Azzalini

Examples

# d=1
f1 <- makeSECdistr(dp=c(3,2,5), family="SN", name="First-SN")
plot(f1) # compare the outcome with the output produced by classical 'sn'
#
# d=2
Omega2 <- matrix(c(3, -3, -3, 6), 2, 2)    
dp <- list(c(10,30), Omega=Omega2, alpha=c(-3, 5))
f2 <-  makeSECdistr(dp=dp, family="sn", name="SN-2d", compNames=c("x1","x2"))
show(f2)     
plot(f2)
plot(f2, range=cbind(c(4,16), c(25, 40)), landmarks="")

gg.sn documentation built on Dec. 2, 2026, 5:07 p.m.