Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions notebooks/plot/dynesty_plotter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,20 @@
" - https://dynesty.readthedocs.io/en/latest/quickstart.html\n",
" - https://dynesty.readthedocs.io/en/latest/api.html#module-dynesty.plotting\n",
"\n",
"In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters that are\n",
"described in the API docs.\n",
"In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters described\n",
"in the `corner.py` API docs \u2014 they are forwarded to `corner.corner`. A name `corner.py` does not accept raises a\n",
"`TypeError` naming it, so a typo, or an argument belonging to a different plotting library, fails loudly instead of\n",
"being quietly ignored.\n",
"\n",
"Dynesty plotters use `_kwargs` dictionaries to pass visualization settings to matplotlib lib. For example, below,\n",
"`corner.py` uses `_kwargs` dictionaries to pass visualization settings through to matplotlib. For example, below,\n",
"we:\n",
"\n",
" - Set the fontsize of the x and y labels by passing `label_kwargs={\"fontsize\": 16}`.\n",
" - Set the fontsize of the title by passing `title_kwargs={\"fontsize\": \"10\"}`.\n",
"\n",
"There are other `_kwargs` inputs we pass as None, you should check out the Dynesty docs if you need to customize your\n",
"figure.\n",
"There are other `_kwargs` inputs we pass as None; check out the `corner.py` docs if you need to customize your\n",
"figure further. Note that these are `corner.py`'s options, not dynesty's \u2014 `corner_cornerpy` wraps `corner.py`,\n",
"so dynesty's own `cornerplot` arguments (`dims`, `span`, `quantiles_2d`, \u2026) do not apply here.\n",
"\n",
"The `corner_anesthetic` function produces a triangle of 1D and 2D PDF's of every parameter using the library `anesthetic`."
]
Expand All @@ -192,21 +195,16 @@
"source": [
"aplt.corner_cornerpy(\n",
" samples=samples,\n",
" dims=None,\n",
" span=None,\n",
" quantiles=[0.025, 0.5, 0.975],\n",
" color=\"black\",\n",
" smooth=0.02,\n",
" quantiles_2d=None,\n",
" hist_kwargs=None,\n",
" hist2d_kwargs=None,\n",
" label_kwargs={\"fontsize\": 16},\n",
" show_titles=True,\n",
" title_fmt=\".2f\",\n",
" title_kwargs={\"fontsize\": \"10\"},\n",
" truths=None,\n",
" truth_color=\"red\",\n",
" truth_kwargs=None,\n",
" max_n_ticks=5,\n",
" top_ticks=False,\n",
" use_math_text=False,\n",
Expand Down
6 changes: 4 additions & 2 deletions notebooks/plot/emcee_plotter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@
"\n",
"- https://corner.readthedocs.io/en/latest/index.html\n",
"\n",
"In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters that are\n",
"described in the API docs."
"In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters described\n",
"in the `corner.py` API docs \u2014 they are forwarded to `corner.corner`. A name `corner.py` does not accept raises a\n",
"`TypeError` naming it, so a typo, or an argument belonging to a different plotting library, fails loudly instead of\n",
"being quietly ignored."
]
},
{
Expand Down
19 changes: 9 additions & 10 deletions notebooks/plot/nautilus_plotter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,19 @@
"\n",
" - https://nautilus-sampler.readthedocs.io/en/stable/guides/crash_course.html\n",
"\n",
"In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters that are\n",
"described in the API docs.\n",
"In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters described\n",
"in the `corner.py` API docs \u2014 they are forwarded to `corner.corner`. A name `corner.py` does not accept raises a\n",
"`TypeError` naming it, so a typo, or an argument belonging to a different plotting library, fails loudly instead of\n",
"being quietly ignored.\n",
"\n",
"Nautilus plotters use `_kwargs` dictionaries to pass visualization settings to matplotlib lib. For example, below,\n",
"`corner.py` uses `_kwargs` dictionaries to pass visualization settings through to matplotlib. For example, below,\n",
"we:\n",
"\n",
" - Set the fontsize of the x and y labels by passing `label_kwargs={\"fontsize\": 16}`.\n",
" - Set the fontsize of the title by passing `title_kwargs={\"fontsize\": \"10\"}`.\n",
" - Set the fontsize of the x and y labels by passing `label_kwargs={\"fontsize\": 24}`.\n",
"\n",
"There are other `_kwargs` inputs we pass as None, you should check out the Nautilus docs if you need to customize your\n",
"figure.\n",
"Check out the `corner.py` docs if you need to customize your figure further. Note that these are `corner.py`'s\n",
"options, not nautilus's \u2014 `corner_cornerpy` wraps `corner.py`, so figure-geometry arguments from other plotting\n",
"libraries (`panelsize`, `xticksize`, `yticksize`, \u2026) do not apply here.\n",
"\n",
"The `corner_anesthetic` function produces a triangle of 1D and 2D PDF's of every parameter using the library `anesthetic`."
]
Expand All @@ -195,9 +197,6 @@
"source": [
"aplt.corner_cornerpy(\n",
" samples=samples,\n",
" panelsize=3.5,\n",
" yticksize=16,\n",
" xticksize=16,\n",
" bins=20,\n",
" plot_datapoints=False,\n",
" plot_density=False,\n",
Expand Down
25 changes: 11 additions & 14 deletions notebooks/plot/zeus_plotter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,19 @@
"\n",
"The zeus readthedocs describes fully all of the methods used below\n",
"\n",
" - https://zeus-mcmc.readthedocs.io/en/latest/api/plotting.html#cornerplot\n",
" - https://zeus-mcmc.readthedocs.io/en/latest/notebooks/normal_distribution.html\n",
"\n",
"Note that `corner_cornerpy` wraps `corner.py`, not zeus's own `cornerplot` \u2014 zeus's arguments\n",
"(`weight_list`, `span`, `truth`, `fill`, `cut`, `size`, \u2026) are not accepted here.\n",
"\n",
"The `aplt.corner_cornerpy` function wraps the library `corner.py` to make corner plots of the PDF:\n",
"\n",
"- https://corner.readthedocs.io/en/latest/index.html\n",
"\n",
"In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters that are\n",
"described in the API docs.\n",
"In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters described\n",
"in the `corner.py` API docs \u2014 they are forwarded to `corner.corner`. A name `corner.py` does not accept raises a\n",
"`TypeError` naming it, so a typo, or an argument belonging to a different plotting library, fails loudly instead of\n",
"being quietly ignored.\n",
"\n",
"The `corner_cornerpy` function produces a triangle of 1D and 2D PDF's of every parameter using the library `corner.py`."
]
Expand All @@ -176,22 +180,15 @@
"source": [
"aplt.corner_cornerpy(\n",
" samples=samples,\n",
" weight_list=None,\n",
" levels=None,\n",
" span=None,\n",
" quantiles=[0.025, 0.5, 0.975],\n",
" truth=None,\n",
" levels=(0.68, 0.95),\n",
" color=None,\n",
" alpha=0.5,\n",
" linewidth=1.5,\n",
" fill=True,\n",
" fontsize=10,\n",
" show_titles=True,\n",
" title_fmt=\".2f\",\n",
" title_fontsize=12,\n",
" cut=3,\n",
" title_kwargs={\"fontsize\": 12},\n",
" label_kwargs={\"fontsize\": 10},\n",
" truths=None,\n",
" fig=None,\n",
" size=(10, 10),\n",
")\n"
],
"outputs": [],
Expand Down
18 changes: 8 additions & 10 deletions scripts/plot/dynesty_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,20 @@
- https://dynesty.readthedocs.io/en/latest/quickstart.html
- https://dynesty.readthedocs.io/en/latest/api.html#module-dynesty.plotting

In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters that are
described in the API docs.
In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters described
in the `corner.py` API docs — they are forwarded to `corner.corner`. A name `corner.py` does not accept raises a
`TypeError` naming it, so a typo, or an argument belonging to a different plotting library, fails loudly instead of
being quietly ignored.

Dynesty plotters use `_kwargs` dictionaries to pass visualization settings to matplotlib lib. For example, below,
`corner.py` uses `_kwargs` dictionaries to pass visualization settings through to matplotlib. For example, below,
we:

- Set the fontsize of the x and y labels by passing `label_kwargs={"fontsize": 16}`.
- Set the fontsize of the title by passing `title_kwargs={"fontsize": "10"}`.

There are other `_kwargs` inputs we pass as None, you should check out the Dynesty docs if you need to customize your
figure.
There are other `_kwargs` inputs we pass as None; check out the `corner.py` docs if you need to customize your
figure further. Note that these are `corner.py`'s options, not dynesty's — `corner_cornerpy` wraps `corner.py`,
so dynesty's own `cornerplot` arguments (`dims`, `span`, `quantiles_2d`, …) do not apply here.

The `corner_anesthetic` function produces a triangle of 1D and 2D PDF's of every parameter using the library `anesthetic`.
"""
Expand All @@ -100,21 +103,16 @@
"""
aplt.corner_cornerpy(
samples=samples,
dims=None,
span=None,
quantiles=[0.025, 0.5, 0.975],
color="black",
smooth=0.02,
quantiles_2d=None,
hist_kwargs=None,
hist2d_kwargs=None,
label_kwargs={"fontsize": 16},
show_titles=True,
title_fmt=".2f",
title_kwargs={"fontsize": "10"},
truths=None,
truth_color="red",
truth_kwargs=None,
max_n_ticks=5,
top_ticks=False,
use_math_text=False,
Expand Down
6 changes: 4 additions & 2 deletions scripts/plot/emcee_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@

- https://corner.readthedocs.io/en/latest/index.html

In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters that are
described in the API docs.
In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters described
in the `corner.py` API docs — they are forwarded to `corner.corner`. A name `corner.py` does not accept raises a
`TypeError` naming it, so a typo, or an argument belonging to a different plotting library, fails loudly instead of
being quietly ignored.
"""
samples = result.samples

Expand Down
19 changes: 9 additions & 10 deletions scripts/plot/nautilus_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,19 @@

- https://nautilus-sampler.readthedocs.io/en/stable/guides/crash_course.html

In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters that are
described in the API docs.
In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters described
in the `corner.py` API docs — they are forwarded to `corner.corner`. A name `corner.py` does not accept raises a
`TypeError` naming it, so a typo, or an argument belonging to a different plotting library, fails loudly instead of
being quietly ignored.

Nautilus plotters use `_kwargs` dictionaries to pass visualization settings to matplotlib lib. For example, below,
`corner.py` uses `_kwargs` dictionaries to pass visualization settings through to matplotlib. For example, below,
we:

- Set the fontsize of the x and y labels by passing `label_kwargs={"fontsize": 16}`.
- Set the fontsize of the title by passing `title_kwargs={"fontsize": "10"}`.
- Set the fontsize of the x and y labels by passing `label_kwargs={"fontsize": 24}`.

There are other `_kwargs` inputs we pass as None, you should check out the Nautilus docs if you need to customize your
figure.
Check out the `corner.py` docs if you need to customize your figure further. Note that these are `corner.py`'s
options, not nautilus's — `corner_cornerpy` wraps `corner.py`, so figure-geometry arguments from other plotting
libraries (`panelsize`, `xticksize`, `yticksize`, …) do not apply here.

The `corner_anesthetic` function produces a triangle of 1D and 2D PDF's of every parameter using the library `anesthetic`.
"""
Expand All @@ -103,9 +105,6 @@
"""
aplt.corner_cornerpy(
samples=samples,
panelsize=3.5,
yticksize=16,
xticksize=16,
bins=20,
plot_datapoints=False,
plot_density=False,
Expand Down
25 changes: 11 additions & 14 deletions scripts/plot/zeus_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,36 +81,33 @@

The zeus readthedocs describes fully all of the methods used below

- https://zeus-mcmc.readthedocs.io/en/latest/api/plotting.html#cornerplot
- https://zeus-mcmc.readthedocs.io/en/latest/notebooks/normal_distribution.html

Note that `corner_cornerpy` wraps `corner.py`, not zeus's own `cornerplot` — zeus's arguments
(`weight_list`, `span`, `truth`, `fill`, `cut`, `size`, …) are not accepted here.

The `aplt.corner_cornerpy` function wraps the library `corner.py` to make corner plots of the PDF:

- https://corner.readthedocs.io/en/latest/index.html

In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters that are
described in the API docs.
In all the examples below, we use the `kwargs` of this function to pass in any of the input parameters described
in the `corner.py` API docs — they are forwarded to `corner.corner`. A name `corner.py` does not accept raises a
`TypeError` naming it, so a typo, or an argument belonging to a different plotting library, fails loudly instead of
being quietly ignored.

The `corner_cornerpy` function produces a triangle of 1D and 2D PDF's of every parameter using the library `corner.py`.
"""
aplt.corner_cornerpy(
samples=samples,
weight_list=None,
levels=None,
span=None,
quantiles=[0.025, 0.5, 0.975],
truth=None,
levels=(0.68, 0.95),
color=None,
alpha=0.5,
linewidth=1.5,
fill=True,
fontsize=10,
show_titles=True,
title_fmt=".2f",
title_fontsize=12,
cut=3,
title_kwargs={"fontsize": 12},
label_kwargs={"fontsize": 10},
truths=None,
fig=None,
size=(10, 10),
)


Expand Down
Loading