JuliaPlots / StatsPlots.jl

Statistical plotting recipes for Plots.jl
Other
437 stars 88 forks source link

Improve docstrings (e.g., density) #462

Closed hdavid16 closed 2 years ago

hdavid16 commented 3 years ago

The density function docstring is not very helpful. I recently found out there are some keyword arguments that you can pass, like bandwidth. However, the docstring only shows:

help?> StatsPlots.density
  density(x)
  density!(x)

  Make a line plot of a kernel density estimate of x.

  Arguments
  ≡≡≡≡≡≡≡≡≡≡≡

    •  x: AbstractVector of samples for probability density estimation

  Example
  ≡≡≡≡≡≡≡≡≡

  julia> using StatsPlots
  julia> density(randn(100_000))

I don't see any documentation elsewhere to point out other keyword arguments that are relevant in density plots.

hdavid16 commented 3 years ago

Another example with insufficient documentation:

help?> StatsPlots.ecdfplot
  No documentation found.

  StatsPlots.ecdfplot is a Function.

  # 1 method for generic function "ecdfplot":
  [1] ecdfplot(args...; kw...) in StatsPlots at C:\Users\HD\.julia\packages\RecipesBase\92zOw\src\RecipesBase.jl:357