Will arviz not plot a timeseries by dim?


After plotting the ppc by the dims of my model, I tried to plot a time series by the same. Is there anyway to do this? I don’t see a coords argument in the arviz documents under plot_ts.

Hi. So in general you need more info here to get a good answer.

But if you were trying az.plot_hdi then this is an issue I identified in plot_hdi fails when x data is time series · Issue #1968 · arviz-devs/arviz · GitHub

Try adding the kwarg smooth=False.

I found the argument plot_dim which is a string and thought I should put the name of the dim that I want inside my coord argument. That didn’t work so then I took your suggestion and got the below error message.

This is what I ran.

az.plot_ts(trace, y='obs', plot_dim='location', smooth=False)

TypeError Traceback (most recent call last)
/tmp/ipykernel_27850/3216746092.py in
----> 1 az.plot_ts(trace, y=‘obs’, plot_dim=‘location’, smooth=False)

TypeError: plot_ts() got an unexpected keyword argument ‘smooth’

The smooth kwarg is just if you were doing az.plot_hdi. Haven’t got any experience with plot_ts.

If you don’t get an answer here, then you could create an issue on arviz with a minimum working example.