imageplot_2ts() plots an image of the two time scales hazard (or survival or
cumulative hazard) with contour lines.
This is the default call implemented in plot.haz2ts.
Usage
imageplot_2ts(x, y, z, plot_options = list(), ...)Arguments
- x
The coordinates for the x-axis. This is a vector of intervals over the
uaxis (default), a matrix with the corner points of the parallelograms over thettime scale, or a vector of intervals for thettime scale.- y
The coordinates for the y-axis. This is a vector of intervals over the
stime scale (default), or a matrix with the corner points of the parallelograms over thestime scale.- z
The values of the surface to plot, organized in a matrix with dimensions compatible with those of
xandy. The default is to plot the hazard.- plot_options
A list of options for the plot:
loghazardA Boolean. Default isFALSE. IfFALSEthe function returns a plot of the hazard surface, ifTRUEthe function returns a plot of the log-hazard surface.log10hazardA Boolean. Default isFALSE. IfTRUE, then a log10-hazard surface is plotted.originalA Boolean. Default isTRUE. Plot the (log-)hazard in the (t,s)-plane. IfFALSE, the (log-)hazard will be plotted in the (u,s)-plane.rectangular_gridA Boolean. Default isFALSE. IfTRUE, a rectangular grid is used for plotting also in the (t,s)-plane as opposed to the grid of parallelograms used as default in the (t,s)-plane.col_paletteA function defining the color palette. The default palette isrev(viridis::plasma()).n_shadesThe number of color shades to plot, default is 50.breaksThe vector of breaks for the color legend. Ifn_shadesis provided, this should be of lengthn_shades + 1. Otherwise,n_shadeswill be recalculated accordingly.show_legendA Boolean. Default isTRUE. IfFALSEno legend will be plotted, useful for multi-panel figures with common legend. Works only for plots on rectangular grid!tmaxThe maximum value oftthat should be plotted.mainThe title of the plot.xlabThe label of the first time axis (plotted on the x axis).ylabThe label of the second time axis (plotted on the y axis).xlimA vector with two elements defining the limits of the time scale on the x axis.ylimA vector with two elements defining the limits of the time scale on the y axis.cex_mainThe magnification to be used for the main title, default is1.2.cex_labThe magnification to be used for the axis labels, default is1.contour_linesA Boolean. Default isFALSE. IfTRUEwhite contour lines are added to the surfaces.contour_colThe color for the contour lines. Default iswhite.contour_cexThe magnification to be used for the contour lines. Default is.8.contour_nlevThe number of contour levels. Default is10.
- ...
Further arguments to image.plot or image