grantmcdermott / tinyplot

Lightweight extension of the base R graphics system
https://grantmcdermott.com/tinyplot
Apache License 2.0
226 stars 7 forks source link

Support type = "rect" #161

Closed grantmcdermott closed 3 months ago

grantmcdermott commented 3 months ago

Closes #160.

Should also open the door up to other derivative plot types (most obviously histograms), as well as segments (which use a similar xmin.ymin,xmax,ymax coordinate logic).

Example:

pkgload::load_all("~/Documents/Projects/tinyplot/")
#> ℹ Loading tinyplot

i = 4*(0:10)

plt(
  xmin = 100+i,
  ymin = 300+i,
  xmax = 150+i,
  ymax = 380+i,
  by = i,
  type = "rect",
  fill = 0.3
)

Created on 2024-07-06 with reprex v2.1.0