Learn R Programming

ggplot2 (version 3.5.0)

translate_shape_string: Translating shape strings

Description

translate_shape_string() is a helper function for translating point shapes given as a character vector into integers that are interpreted by the grid system.

Usage

translate_shape_string(shape_string)

Value

An integer vector with translated shapes.

Arguments

shape_string

A character vector giving point shapes.

Examples

Run this code
translate_shape_string(c("circle", "square", "triangle"))

# Strings with 1 or less characters are interpreted as symbols
translate_shape_string(c("a", "b", "?"))

Run the code above in your browser using DataLab