Using the following code with the API from version 0.4 gives no errors when creating a plot with a legenda:
with Plot.from_paths(files[:1]) as plot:
inc_plot = plot.new("inclusion", result_format="number")
inc_plot.set_grid()
inc_plot.set_xlim(0, 4000)
inc_plot.set_legend()
inc_plot.add_random(add_text=False)
all_files = all(plot.is_file.values())
for key in list(plot.analyses):
if all_files or not plot.is_file[key]:
inc_plot.add_wss(
key, 95, add_value=False, add_text=False)
inc_plot.fig.set_size_inches(10, 5, forward=True)
inc_plot.show()
inc_plot.save("simulation_results.png")
Whereas running the same code with version 0.4.1:
The error message isn't very informative.
..\Python\Python39\lib\site-packages\asreviewcontrib\visualization\plot_base.py:32: UserWarning: Legend does not support [<matplotlib.lines.Line2D object at 0x000001F563215400>] instances.
A proxy artist may be used instead.
See: https://matplotlib.org/users/legend_guide.html#creating-artists-specifically-for-adding-to-the-legend-aka-proxy-artists
self.ax.legend(self.legend_plt, self.legend_name, loc=loc)
Using the following code with the API from version 0.4 gives no errors when creating a plot with a legenda:
Whereas running the same code with version 0.4.1:
The error message isn't very informative.