Merlion icon indicating copy to clipboard operation
Merlion copied to clipboard

[BUG] merlin/plot.py -

Open ravenrip opened this issue 2 years ago • 0 comments

Describe the bug Unable to run plot.py without error: ValueError: Multi-dimensional indexing (e.g. obj[:, None]) is no longer supported. Convert to a numpy array before indexing instead.

To Reproduce Run code from tutorial: for model in [model1, model2, model3]: print(type(model).name) fig, ax = model.plot_anomaly( time_series=test_data, time_series_prev=train_data, filter_scores=True, plot_time_series_prev=True) plot_anoms(ax=ax, anomaly_labels=test_labels) plt.show() print()

Expected behavior Plot the Anamalies based on model

Screenshots Worked after adding image

Desktop (please complete the following information):

  • OS: Ubuntu 16.04 LTS

Additional context Resolved by updating Line 219 & 246: ln = ax.plot(np.array(y.index), y.np_values, c="k", alpha=0.8, lw=1, zorder=1, label=metric_name)

ravenrip avatar May 19 '23 15:05 ravenrip