1
$\begingroup$

I want to contour plot some copula cases for illustrative purposes in a paper. New user here, so apologies if this is straightforward. An example (taken from another source) is below of what I had in mind.

I've been doing the following

\[ScriptCapitalD][\[Alpha]_] = CopulaDistribution[{"Clayton", \[Alpha]}, {UniformDistribution[{0, 1}], UniformDistribution[{0, 1}]}];

Table[ListPlot[RandomVariate[\[ScriptCapitalD][\[Alpha]], 10^3], PlotLabel -> Row[{"\[Alpha] = ", \[Alpha]}]], {\[Alpha], {1/2, 3, 10, 60, 500}}]

but that's not a counterplot.
enter image description here

$\endgroup$
1
  • 2
    $\begingroup$ Something like what ContourPlot[PDF[\[ScriptCapitalD][1/5], {x, y}], {x, 0, 1}, {y, 0, 1}, ContourShading -> None, PlotRange -> All] produces? $\endgroup$ Commented Jul 20, 2022 at 19:13

1 Answer 1

2
$\begingroup$
dist[α_] = 
  CopulaDistribution[{"Binormal", α}, {NormalDistribution[], NormalDistribution[]}];

Table[
  ContourPlot[
    PDF[dist[α], {x, y}], {x, y} ∈ Rectangle[{-3, -3}, {3, 3}],
    PlotRange -> All, Contours -> 10, PlotPoints -> 100,
    ContourShading -> None,
    ContourStyle -> Lighter@Blue,
    GridLines -> Automatic, GridLinesStyle -> GrayLevel[0.9],
    Method -> {"GridLinesInFront" -> False}
  ],
  {α, {0.1, 0.5, 0.9}}
]

three contour plots

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.