Vindaar / ggplotnim

A port of ggplot2 for Nim
https://vindaar.github.io/ggplotnim
MIT License
175 stars 15 forks source link

Avoid duplicates when drawing with constant `aes` #174

Closed Vindaar closed 9 months ago

Vindaar commented 9 months ago

Fixes duplication of constant geoms.

For example a geom like:

geom_text(aes = aes(x = 1.0, y = 2.0, text = "foo"))

would previously draw the text once for every row in the input DF.

* v0.6.2
- handle geom calls with constant values better. Previously we
  sometimes ended up drawing the same e.g. text multiple times, once
  for each input DF row. We now deduplicate for cases where ~x~ and
  ~y~ are constant.