pmx_plot_eta_matrix: Eta matrix plot

View source: R/pmx-plots-matrix.R

pmx_plot_eta_matrixR Documentation

Eta matrix plot

Description

Eta matrix plot

Usage

pmx_plot_eta_matrix(
  ctr,
  title,
  dname,
  type.eta,
  text_color,
  is.shrink,
  shrink,
  point,
  is.smooth,
  smooth,
  is.hline,
  hline,
  is.vreference_line,
  vreference_line,
  filter,
  strat.facet,
  facets,
  strat.color,
  trans,
  pmxgpar,
  labels,
  axis.title,
  axis.text,
  ranges,
  is.band,
  band,
  is.draft,
  draft,
  is.identity_line,
  identity_line,
  scale_x_log10,
  scale_y_log10,
  color.scales,
  ...
)

Arguments

ctr

pmx controller

title

character the plot title

dname

name of dataset to be used

type.eta

character type of eat can be 'mode' or 'mean'.'mode' by default

text_color

color of the correlation text in the upper matrix

is.shrink

logical if TRUE add shrinkage to the plot

shrink

pmxShrinkClass shrinkage graphical parameter or list coercible into one

point

list geom_point graphical parameter

is.smooth

logical if TRUE add smoothing to lower matrix plots

smooth

list geom_smooth graphical parameters

is.hline

logical if TRUE add horizontal line to lower matrix plots

hline

list geom_hline graphical parameters

is.vreference_line

logical if TRUE add reference line to diag plots

vreference_line

list geom_vline graphical parameters

pmx_update parameters

filter

expression filter which will be applied to plotting data.

strat.facet

formula optional stratification parameter by facetting. This split plot by strats(each strat in a facet)

facets

list facet_wrap parameters.

strat.color

character optional stratification parameter by grouping. This will split the plot by group (color) of strat.

trans

character define the transformation to apply on x or y or both variables

pmxgpar

a object of class pmx_gpar possibly the output of the

pmx_gpar: Shared basic graphics parameters

labels

list list containing plot and/or axis labels: title, subtitle, x , y

axis.title

list containing element_text attributes to customize the axis title. (similar to ggplot2 axis.title theme)

axis.text

list containing element_text attributes to customize the axis text (similar to ggplot2 axis.text theme)

ranges

list limits of x/y ranges

is.band

logical if TRUE add horizontal band

band

list horizontal band parameters. geom_hline graphical parameters.

is.draft

logical if TRUE add draft layer

draft

list draft layer parameters. geom_text graphical parameters.

is.identity_line

logical if TRUE add an identity line

identity_line

listgeom_abline graphical parameters.

scale_x_log10

logical if TRUE use log10 scale for x axis.

scale_y_log10

logical if TRUE use log10 scale for y axis.

color.scales

list define scales parameter in case of strat.color pmx_settings

...

others graphics parameters passed :

  • pmx_gpar internal function to customize shared graphical parameters

  • eta_pairs ggPMX internal function for eta matrix plot.

  • pmx_update function.

eta_pairs parameters

Value

ggplot2 object

Examples




# basic use  ---------------------------------------

ctr <- theophylline()
p <- ctr %>% pmx_plot_eta_matrix

# update graphical parameter  ----------------------

## update labels
ctr %>% pmx_plot_eta_matrix(
  labels = list(title = "Eta matrix new title")
)

## remove draft
ctr %>% pmx_plot_eta_matrix(is.draft = FALSE)

## change text color line
ctr %>% pmx_plot_eta_matrix(
  text_color="red",
  shrink=pmx_shrink(mapping=aes(color="magenta"))
  )

## custom point aes and static parameters
## we can customize any geom_point parameter
ctr %>% pmx_plot_eta_matrix(
  point = list(color = "blue", shape = 4)
)



# stratification  ----------------------------------

## IGNORE continuous stratification
ctr %>% pmx_plot_eta_matrix(strat.color = "WT0")
## IGNORE  categorical stratification
ctr %>% pmx_plot_eta_matrix(strat.facet = ~SEX)

# subsetting  --------------------------------------

## we can use any expression involving the data
ctr %>% pmx_plot_eta_matrix(filter = EFFECT%in%  c("Cl","ka"))


ggPMX documentation built on July 9, 2023, 7:45 p.m.