Skip to content

Commit

Permalink
Use compact traceplot by default (#3502)
Browse files Browse the repository at this point in the history
* Use compact traceplot by default

* Protect against old values of arviz
  • Loading branch information
ColCarroll authored and twiecki committed May 31, 2019
1 parent 204ef18 commit 3fa26cf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pymc3/plots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,21 @@ def wrapped(*args, **kwargs):
forestplot = map_args(az.plot_forest)
kdeplot = map_args(az.plot_kde)
plot_posterior = map_args(az.plot_posterior)
traceplot = map_args(az.plot_trace)
energyplot = map_args(az.plot_energy)
densityplot = map_args(az.plot_density)
pairplot = map_args(az.plot_pair)

# Use compact traceplot by default
@map_args
@functools.wraps(az.plot_trace)
def traceplot(*args, **kwargs):
try:
kwargs.setdefault('compact', True)
return az.plot_trace(*args, **kwargs)
except TypeError:
kwargs.pop('compact')
return az.plot_trace(*args, **kwargs)

# addition arg mapping for compare plot
@functools.wraps(az.plot_compare)
def compareplot(*args, **kwargs):
Expand Down

0 comments on commit 3fa26cf

Please sign in to comment.