This function creates the actual plot based on processed data and aesthetic choices.
create_plot(
data,
color1 = "cornflowerblue",
color2 = "grey",
color3 = "indianred",
highLog2fc = 0.585,
lowLog2fc = -0.585,
expressionDirection = "regulation",
negativeLogPValue = "negLog10p",
logFoldChange = "log2fc",
timeVariable = "reg_time_org",
xAxis = "organ",
yAxis = "timePoint"
)
The data frame containing the plot data.
Color for one category of data points.
Color for another category of data points.
Color for a third category of data points.
Threshold for high log2 fold change values.
Threshold for low log2 fold change values.
Direction of gene expression.
The name of the column containing the negative log p-values.
The name of the column containing log fold change values.
The variable representing time.
The name of the x-axis variable.
The name of the y-axis variable.
The ggplot object.
plotdata <- get_clear_scatterplot_df()
p <- create_plot(
plotdata,
color1 = "cornflowerblue",
color2 = "grey",
color3 = "indianred",
highLog2fc = 0.585,
lowLog2fc = -0.585,
expressionDirection = "regulation",
negativeLogPValue = "negLog10p",
logFoldChange = "log2fc",
timeVariable = "reg_time_org",
xAxis = "organ",
yAxis = "timePoint"
)
#> Scale for colour is already present.
#> Adding another scale for colour, which will replace the existing scale.