View source: R/scatterplot_with_fill_and_shape.R
scatterplot_with_fill_and_shape | R Documentation |
scatterplot_with_fill_and_shape
Takes a data.frame and creates an x-y scatterplot
scatterplot_with_fill_and_shape(
plot_data,
x_var,
y_var,
fill_var,
fill_palette,
shape_var = "None",
shape_palette,
point_labels = NULL,
label_seed = NA,
point_size = 4,
...
)
plot_data |
data.frame - plot data |
x_var |
character - name of the column to plot on the x axis |
y_var |
character - name of the column to plot on the y axis |
fill_var |
character - name of the column to use as the fill aesthetic |
fill_palette |
character - a named character vectors of colours for the fill aesthetic |
shape_var |
character - name of the column to use as the shape aesthetic |
shape_palette |
character - a named character vectors of shapes for the shape aesthetic |
point_labels |
character - labels for the points. Either a column name from the plot_data or a character vector. Default: NULL - no labels |
point_size |
numeric - size of points |
labels_seed |
integer - seed for geom_text_repel |
The plot data data.frame should contain the columns for the x, y and fill variables and optionally ones for the shape variable and text labels. The text label column should be named sample_name.
ggplot2 object
scatterplot_with_fill_and_shape( plot_data, 'PC1', 'PC2', 'Gene', fill_palette,
'Genotype', shape_palette, sample_names )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.