Vindaar / ggplotnim

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

Grid line theme additions & custom break support #142

Closed Vindaar closed 2 years ago

Vindaar commented 2 years ago

Extends support for features related to the look of plots:

Grid lines

Grid lines may now be changed in width in addition to color, as well as fully disabled.

Ticks

breaks is now a valid argument to scale_x/y_* to set either a custom number of ticks or specific ticks positions (in data space) that should be used. For scale_x/y_date the breaks refer to timestamps that will be used.

For date time ticks in addition a secondary algorithm to generate tick labels was added via the new dateAlgo argument. dtaAddDuration allows to simply generate tick labels based on the first valid label based on format string by adding the user given dateSpacing. This is better suited for sparse data in the date column, compared to the default algorithm, which is based on filtering the on the column.