Skip to contents

Plot dumbbell chart.

Usage

draw_dumbbell(
  data,
  x = NULL,
  y1 = NULL,
  y2 = NULL,
  topn = 20,
  sort = "insc",
  legend = NULL,
  cols = c("#006400", "#b32134"),
  main = ""
)

Arguments

data

A data frame contains data to be plotted.

x

A category variable in data.

y1

Variable indicate start point.

y2

Variable indicate end point.

topn

Top n values to be plotted.

sort

Sort options.

legend

Legends.

cols

Colors of the start and end points.

main

Main title of the plot.

Value

A dumbbell plot.