View source: R/plot_multi_drugs.R
PlotMultiDrugSurface | R Documentation |
This function will generate a dynamic 3D plot response values or synergy
scores for all the observed data points in a multi-drug combination block.
The concentrations of drugs will be projected to 2 dimensions and plot along
x an y axis. A surface for the selected plot_value
and points for
all the concentration combinations will be plotted.
PlotMultiDrugSurface( data, plot_block = 1, plot_value = "response", summary_statistic = NULL, plot_title = NULL, distance_method = "mahalanobis", high_value_color = "#FF0000", low_value_color = "#00FF00", show_data_points = TRUE, point_color = "#DDA137", text_size_scale = 1, axis_line = FALSE, colorbar_tick = FALSE, x_range = NULL, y_range = NULL, z_range = NULL, color_range = NULL, camera_width = NULL, camera_height = NULL, camera_scale = 1 )
data |
A list object generated by function |
plot_block |
A character/integer. It indicates the block ID for the block to visualize. |
plot_value |
A vector of characters. It contains the name of one or more
metrics 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 charactor value. It specifies the plot title. If it is
|
distance_method |
The methods to calculate the distance between
different data points from the concentration of drugs. The distance matrix
is used for dimension reduction. This parameter is used to set the
parameter |
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. |
show_data_points |
A logical value. If it is |
point_color |
An R color value. It indicates the color for data points. |
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. |
axis_line |
A logical value. Whether to show the axis lines and ticks. |
colorbar_tick |
A logical value. Whether to show the ticks on color bar. |
x_range |
A numeric vector with two values or NULL. It is used to set
the range of x axis (coordinate 1). For example, |
y_range |
A numeric vector with two values or NULL. It is used to set
the range of y axis (coordinate 2). For example, |
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 |
camera_width |
A numeric value or NULL. It indicates the output figure's width on pixel. |
camera_height |
A numeric value or NULL. It indicates the output figure's height on pixel. |
camera_scale |
A numeric value. The output plot while clicking the camera button.will multiply title/legend/axis/canvas sizes by this factor. |
A plotly plot object.
Shuyu Zheng shuyu.zheng@helsinki.fi
Jing Tang jing.tang@helsinki.fi
data("NCATS_screening_data") data <- ReshapeData(NCATS_screening_data) p <- PlotMultiDrugSurface( data, plot_block = 1, plot_value = "response", show_data_points = TRUE, distance_method = "mahalanobis", summary_statistic = "mean" ) p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.