# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .jl
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Julia 0.4.0-rc4
#     language: julia
#     name: julia-0.4
# ---

using Plots
pyplot()
default(leg=false,size=(400,400));
y = collect(linspace(0,1,100))
p = subplot(Any[y*i for i in 1:4],n=4, ylabel=["y1","y1","y2","y2"], xlabel=["x1","x2","x1","x2"])

subplot!(link=true)
#xlims!(p.plts[1], (-5,50))
#ylims!(p.plts[1], -0.5,1)

gplt = p.plts[1].o
plot!(p.plts[1], rand(100,5)*3)

lims = [Inf,-Inf]
for l in gplt.layers
    Plots.expandLimits!(lims, l.mapping[:y])
end
lims

p = subplot(repmat(y,1,4),layout=[1,1,2])

using Plots, StatsBase; pyplot()
default(size=(600,600),leg=false)
p = subplot(Any[rand(sample(10:200))*sample(1:10) for i in 1:6], n=6, link=true)
subplot!(xlabel=["x1","x2","x3"], ylabel=["y1","","","y2"])

# +
using Plots, OnlineStats
qwt()
default(size=(800,800),leg=false)

n = 1000
x = rand(n)
y = 2randn(n) + 0.4x
z = 0.2randn(n) - 0.3x - 0.1y + 100
u = randn(n) - 0.5z - 20
v = 0.1randn(n) + x

M = [x y z u v]
# M = repmat(M, 1, 2)
C = cor(CovarianceMatrix(M))

# debugplots()
p = corrplot(M, C, labels=["item$i" for i in 1:size(M,2)]) #, size=(600,600), colors=[colorant"orange", colorant"black", colorant"green"])
# -

ax = p.plts[end].o.ax
lim1, lim2 = ax[:get_xlim]()
xticks!(p.plts[end], [lim1,lim2])

for (r,c) in gl
    @show r,c
end
length(gl)

plot!(p.plts[1], xlim=(-5,5))
gui()



StarcoderdataJupyterScriptsDedupFiltered