How To Select A Line Type or Point Shape Type for Your ggplot Graph in R Programming

A helper library for ggplot, ggpubr, lists the lines and points customizations available for your graph.

Pierre DeBois
2 min readApr 3, 2024

When creating a graph, you have a lot of choices of what a line looks like. But it’s likely you won’t remember how a line type should be called.

Two little-known functions within a ggplot variant library can help you decide which line or point shape to use in a ggplot line graph.

The library is called ggpubr. It has a variety of customization functions, but it contains only two functions that impact dataset display. These functions are show_line_types() and show_point_shapes().

The show_line_types() function lists and displays the line types available within ggplot and other gg-functions like ggdistribution. Thus you can select a line type to associate with a specific dataset category.

The show_point_shapes() function does the same as the show_line_types() function, except it lists and displays the point types that you would see in a line graph. You can select a…

--

--

Pierre DeBois

#analytics |#datascience |#JS |#rstats |#marketing services for #smallbiz | #retail | #nonprofits Contrib @CMSWire @smallbiztrends #blackbusiness #BLM