JuliaPlots / StatsPlots.jl

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

Cannot set xlims and ylims in marginalkde #514

Closed itsdfish closed 1 year ago

itsdfish commented 1 year ago

The example below shows that xylims and ylims do not work with marginalkde.

MWE

using StatsPlots
x = randn(1024)
y = randn(1024)
marginalkde(x, x+y, xlims = (-2, 2), ylims=(-2, 2))

Version

Julia 1.7.3

StatsPlots 0.15.1
itsdfish commented 1 year ago

Here is a workaround:

using StatsPlots
x = randn(1024)
y = randn(1024)
p = marginalkde(x, x+y)
plot(p, xlims = (-2, 2), ylims=(-2, 2))
itsdfish commented 1 year ago

I just realized that clip is used for bounds. My apologies for the noise.