View source: R/plot_two_drugs.R
Plot2DrugSurface | R Documentation |
This function will generate a surface plot for 2-drug combinations. The axes are the dosage for each drug. The values could be observed response, synergy scores or the reference effects calculated from different models.
Plot2DrugSurface( data, plot_block = 1, drugs = c(1, 2), plot_value = "response", summary_statistic = NULL, plot_title = NULL, interpolate_len = 2, axis_line = FALSE, col_range = NULL, row_range = NULL, z_range = NULL, color_range = NULL, dynamic = FALSE, grid = TRUE, high_value_color = "#FF0000", low_value_color = "#00FF00", text_size_scale = 1 )
data |
A list object generated by function |
plot_block |
A character/integer. It indicates the block ID for the block to visualize. |
drugs |
A vector of characters or integers with length of 2. It contains
the index for two drugs to plot. For example, |
plot_value |
A character value. It indicates the score or response value
to be visualized. If the
If the
|
summary_statistic |
A vector of characters or NULL. It indicates the
summary statistics for all the
If it is |
plot_title |
A character value. It specifies the plot title. If it is
|
interpolate_len |
An integer. It specifies how many values need to be interpolated between two concentrations. It is used to control the smoothness of the synergy surface. |
axis_line |
A logical value. It specifies whether to show the axis lines and ticks in dynamic plot. Axis lines are always shown in the static plot. |
col_range |
A vector of two integers. They specify the starting and
ending concentration of the drug on x-axis. Use e.g., c(1, 3) to specify
that only from 1st to 3rd concentrations of the drug on x-axis are used. By
default, it is |
row_range |
A vector of two integers. They specify the starting and
ending concentration of the drug on y-axis. Use e.g., c(1, 3) to specify
that only from 1st to 3rd concentrations of the drug on y-axis are used. By
default, it is |
z_range |
A vector of two numeric values. They specify the range of
z-axis plotted.Default value is |
color_range |
A vector of two numeric values. They specify the range
of the color bars. The first item (lower bounder) must be less than the
second one (upper bounder). The plotted values larger than defined upper
bounder will be filled in color |
dynamic |
A logical value. If it is |
grid |
A logical value. It indicates whether to add grids on the surface. |
high_value_color |
An R color value. It indicates the color for the high values. |
low_value_color |
An R color value. It indicates the color for low values. |
text_size_scale |
A numeric value. It is used to control the size of text in the plot. All the text size will multiply by this scale factor. |
If dynamic = FALSE
, this function will return a plot project
recorded by recordPlot. If dynamic = FALSE
, this
function will return a plotly plot object.
Shuyu Zheng shuyu.zheng@helsinki.fi
Jing Tang jing.tang@helsinki.fi
data("mathews_screening_data") data <- ReshapeData(mathews_screening_data) Plot2DrugSurface(data) Plot2DrugSurface(data, dynamic = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.