Description Allowable y-axis choices Allowable x-axis choices Author(s)
These generics allow subclasses to refine the choices of allowable variables on the x- and y-axes of a ColumnDataPlot or RowDataPlot. This is most useful for restricting the visualization to a subset of variables, e.g., only taking log-fold changes in a y-axis of a MA plot.
.allowableYAxisChoices(x, se)
takes x
, a Panel instance; and se
, the SummarizedExperiment object.
It is expected to return a character vector containing the names of acceptable variables to show on the y-axis.
For ColumnDataPlots, these should be a subset of the variables in colData(se)
, while for RowDataPlots, these should be a subset of the variables in rowData(se)
.
Given a constant se
, the output of this function should be constant for all instances of the same panel class.
As such, it is a good idea to make use of information precomputed by .cacheCommonInfo
.
For example, .cacheCommonInfo,ColumnDotPlot-method
will add vectors specifying whether a variable in the colData
is valid and discrete or continuous, which can be intersected with any additional requirements in a subclass's method for this generic.
This generic is called by .defineDataInterface
for ColumnDataPlots and RowDataPlots.
Thus, developers wanting to restrict those choices for subclasses can simply specialize .allowableYAxisChoices
rather than reimplementing .defineDataInterface
.
.allowableXAxisChoices(x, se)
is the same as above but controls the variables that can be shown on the x-axis.
This need not return the same subset of variables as .allowableYAxisChoices
.
However, again, the output of this function should be constant for all instances of the same class and a constant se
.
Aaron Lun
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.