AndriSignorell / DescTools

Tools for Descriptive Statistics and Exploratory Data Analysis
http://andrisignorell.github.io/DescTools/
82 stars 18 forks source link

Is it documented: less colors than levels? (Desc plots) #146

Open GegznaV opened 4 months ago

GegznaV commented 4 months ago

There are 7 factor levels and just 3 default colors.

1) Is it reasonable to have a warning in a situation like this (see code below)? 2) Is it documented how to behave in situations like this?

Desc(temperature ~ driver, data = d.pizza) |> plot(type="dens")

image

AndriSignorell commented 4 months ago

As far as I can see, the behavior corresponds to the usual approach of cyclic reuse in R. That's why, in my opinion, no special documentation is needed, at most perhaps a small note in the help file. What would be useful, however, is a corresponding example.

library(DescTools)
Desc(temperature ~ driver, data = d.pizza) |> plot(type="dens", col=Pal("Tibco"))

image

GegznaV commented 4 months ago

This example is a great idea!