Skip to content

[ar1_turningpts] Build breaks under arviz 1.x: figsize kwarg on az.plot_trace #929

@jstac

Description

@jstac

Problem

ar1_turningpts.md calls

az.plot_trace(trace, figsize=(17, 6))

Under arviz 1.x (the new arviz_plots backend), plot_trace no longer accepts a figsize keyword and raises:

ValueError: Keyword arguments ['figsize'] have been passed as **kwargs but
have no active aesthetic mapped to them.

This causes a CellExecutionError and fails the build. CI pip-installs the latest arviz, so the failure appears whenever the lecture re-executes.

Why it isn't already red on main

The build uses execution_mode='cache'. The lecture's cached outputs were produced under arviz 0.x, so main stays green only until the cache is invalidated (any edit to the lecture, or a cache clear). It's a latent breakage.

Scope

Verified against arviz 1.2.0 that az.plot_trace(idata) (no figsize), az.summary(..., round_to=...), and both posterior['rho'] and posterior.rho access still work — only the figsize kwarg is the problem.

The same call existed in ar1_bayes.md and is being fixed in #927. A repo-wide grep shows ar1_turningpts.md is the only other lecture passing figsize to an arviz plotting function (bayes_nonconj.md calls plot_trace without it).

Fix

Drop figsize from the az.plot_trace call in ar1_turningpts.md (arviz uses its default size, which is also more consistent with the figure styleguide).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions