Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
aloctavodia committed Jul 7, 2024
2 parents 73818a5 + 10ae2d0 commit f7cc892
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
Binary file added docs/examples/img/Dirichlet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/img/MvNormal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/examples/img/placeholder.png
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/gallery_content.rst
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ Continuous Multivariate Distributions
:shadow: none
:class-card: example-gallery

.. image:: examples/img/placeholder.png
.. image:: examples/img/Dirichlet.png
:alt: Dirichlet

+++
Expand All @@ -574,7 +574,7 @@ Continuous Multivariate Distributions
:shadow: none
:class-card: example-gallery

.. image:: examples/img/placeholder.png
.. image:: examples/img/MvNormal.png
:alt: Multivariate Normal

+++
Expand Down
27 changes: 27 additions & 0 deletions docs/get_cover_gallery_multivariate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# pylint: disable=invalid-name
import matplotlib.pyplot as plt
import arviz as az
import numpy as np
from preliz import Dirichlet, MvNormal

az.style.use("arviz-doc")

w = 1834 / 300
h = 1234 / 300

mu = [0.0, 0]
sigma = np.array([[1, 1], [1, 1.5]])
_, ax = plt.subplots()
ax = MvNormal(mu, sigma).plot_pdf(marginals=False, legend=False, ax=ax)
ax.set_xticks([])
ax.set_yticks([])
ax.spines[["left", "bottom"]].set_visible(False)
plt.savefig(f"examples/img/MvNormal.png")

_, ax = plt.subplots(figsize=(w, h))
ax = Dirichlet([5, 5, 5]).plot_pdf(marginals=False, legend=None, ax=ax)
ax.get_lines()[0].set_alpha(0)
ax.set_xticks([])
ax.set_yticks([])
ax.spines[["left", "bottom"]].set_visible(False)
plt.savefig(f"examples/img/Dirichlet.png")

0 comments on commit f7cc892

Please sign in to comment.