grantmcdermott / tinyplot

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

`type_density()` using the new `type_data`/`type_draw` system #243

Open vincentarelbundock opened 5 hours ago

vincentarelbundock commented 5 hours ago

Density plots are coded differently than all other types.

I won't have time to convert them now, but opening this issue because it would eventually be a good idea to bring them in conformity.

grantmcdermott commented 5 hours ago

Nice. Was just thinking about this!

The existing density logic is quite complicated, because we make special allowances for tinyplot(density(x)). I'm not sure that this exception is worth it anymore, so it might be worth axing and enforcing tinyplot(x, type = "density") to maintain internal simplicity. Will investigate when I have time.

vincentarelbundock commented 2 hours ago

Yes, I think that small amount of breakage is a good idea while the package is still young. We want to start with strong standards.