Visualizing highest posterior density for multiple conditions using arviz plot_hpd

AttributeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_12112/4211280854.py in
12 # AttributeError: module ‘arviz’ has no attribute ‘plot_hdi’
13
—> 14 az.plot_hpd( x ,
15 ppc[‘y_pred’] ,
16 credible_interval = 0.5 ,

AttributeError: module ‘arviz’ has no attribute ‘plot_hpd’
I have been working through the code in the book: “Bayesian Analysis with Python”: Edition 2
Please refer to the code on page 101 in the above book.

mplot.plot( x ,
y ,
‘b.’
)

mplot.plot( x ,
alpha_m + beta_m * x ,
c = ‘k’,
label = f’y = {alpha_m:.2f} + {beta_m:.2f} * x’
)

AttributeError: module ‘arviz’ has no attribute ‘plot_hdi’

az.plot_hpd( x ,
ppc[‘y_pred’] ,
credible_interval = 0.5 ,
color = ‘gray’
)

az.plot_hpd( x ,
ppc[‘y_pred’] ,
color = ‘gray’
)

mplot.xlabel(‘x’)

mplot.ylabel('y ', rotation = 0)

Why am I receiving the error: AttributeError: module ‘arviz’ has no attribute ‘plot_hpd’ ??

has az.plot_hpd() been deprecated or removed from arviz?

If so, what is the current function that can be used instead of plot_hpd() ?: