**_This release breaks code developed with `moniplot` v0.6 and earlier._**
This is the first stable release of `moniplot`, you will need to update your code developed with older versions of moniplot. But, you will be able to reproduce the same plots as you did before.
The main advantage of the new code is that you can display the figures directly on your screen:
> import matplotlib.pyplot as plt
> from moniplot.draw_image import DrawImage
> plot = DrawImage(arr2d)
> fig, axx = plot.subplots()
> plot.draw(axx, fig_info=fig_info, title="A detector image")
> plt.show()
Or as a PDF figure:
> report = MONplot("test_monplot.pdf", "This is an example figure")
> report.set_institute("SRON")
> plot = DrawImage(arr2d)
> fig, axx = plot.subplots()
> plot.draw(axx, fig_info=fig_info, title="A detector image")
> report.add_copyright(axx["image"])
> report.close_this_page(fig)
Actually all the methods of MONplot version 0.6 are available as separate classes (except multiplot). You can mix these different classes on one page, except DrawImage.
Another major change is that xarray.Datasets are no longer accepted as input. You can still use a Dataset as follows:
> import matplotlib.pyplot as plt
> from moniplot.draw_image import DrawImage
> plot = DrawTrend()
> fig, axx = plot.subplots(len(xds.data_vars))
> axx[0].set_title(title)
> for ii, key in enumerate(xds.data_vars):
> plot.draw(axx[ii], xds[key])
> axx[-1].set_xlabel(xds[key].dims[1])
> plt.show()
We still need to update the documentation of moniplot, but the module documentation is updated and contains at least one example.