View source: R/pmx-plots-individual.R
pmx_plot_individual | R Documentation |
Individual plot
pmx_plot_individual(
ctr,
which_pages = 1L,
print = FALSE,
dname,
pred_line,
ipred_line,
point,
is.legend,
use.finegrid,
bloq,
filter,
strat.facet,
facets,
strat.color,
trans,
pmxgpar,
labels,
axis.title,
axis.text,
ranges,
is.smooth,
smooth,
is.band,
band,
is.draft,
draft,
is.identity_line,
identity_line,
scale_x_log10,
scale_y_log10,
color.scales,
...
)
ctr |
pmx controller |
which_pages |
|
print |
|
dname |
|
pred_line |
|
ipred_line |
|
point |
|
is.legend |
|
use.finegrid |
|
bloq |
pmx_update parameters |
filter |
|
strat.facet |
|
facets |
|
strat.color |
|
trans |
|
pmxgpar |
a object of class pmx_gpar possibly the output of the pmx_gpar: Shared basic graphics parameters |
labels |
|
axis.title |
|
axis.text |
|
ranges |
|
is.smooth |
|
smooth |
|
is.band |
|
band |
|
is.draft |
|
draft |
|
is.identity_line |
|
identity_line |
|
scale_x_log10 |
|
scale_y_log10 |
|
color.scales |
|
... |
others graphics parameters passed :
individual parameters |
ggplot2 or list of ggplot2 objects
# basic use ---------------------------------------
ctr <- theophylline()
ctr %>% pmx_plot_individual(which_pages = 1)
## multiple pages
ctr %>% pmx_plot_individual(which_pages = c(1, 3))
## change faceting
ctr %>% pmx_plot_individual(facets = list(nrow = 5, ncol = 5), which_pages = 2)
# update graphical parameter ----------------------
## update labels
ctr %>% pmx_plot_individual(
labels = list(title = "Custom individual plot")
)
## remove draft
ctr %>% pmx_plot_individual(is.draft = FALSE)
## Customize ipred_line with any geom_line parameter
ctr %>% pmx_plot_individual(
pred_line = list(color = "red", linetype = 20, alpha = 0.5)
)
## Customize ipred_line with any geom_line parameter
ctr %>% pmx_plot_individual(
ipred_line = list(size = 5)
)
## Customize any geom_point parameter
ctr %>% pmx_plot_individual(
point = list(aes(alpha = DV), color = "green", shape = 4)
)
## legend
p <- ctr %>% pmx_plot_individual(
is.legend=TRUE,
point=list(shape=20),
pred_line=list(linetype=6)
)
# # stratification ----------------------------------
#
# ## continuous stratification
ctr %>% pmx_plot_individual(strat.color = "WT0")
# # subsetting --------------------------------------
#
# ## we can use any expression involving the data
# ## filter and stratify
ctr %>% pmx_plot_individual(
filter = SEX == 1, strat.facet = ~SEX,
facets = list(nrow = 5, ncol = 5))
# # transformation --------------------------------------
#
# ## apply a log transformation in y
ctr %>% pmx_plot_individual(trans = "log10_y")
# ## apply a custonm trsnformation to normalize axis between 0 and 1
## get a list of parameter
p <- ctr %>% pmx_plot_individual(
which_pages="all",
point=list(shape=4,color='blue',size=10),
facets = list(nrow = 5, ncol = 5),
labels = list(title = "My individuals",x='my time',y='PD data')
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.