New Features
---------------
- Many updates in `pyqtgraph` based widgets.
- `QtPlotCanvas` supports histogram and bar plot. It also has a linear region item in `canvas.region` by default.
- `QtImageCanvas` has scale bar by default. The LUT histogram is hidden by the button on the upper-left corner now.
- Much more unified API between line plot item, scatter plot item and others, such as `face_color`, `edge_color` and `symbol`.
- `QtMultiPlotCanvas`, `QtMultiImageCanvas` can contain multiple plots and images in a single widget.
- `Qt2YPlotCanvas` has two Y-axis and shared X-axis.
- `to_napari` function is available in `magicclass.ext` submodule. Any magic classes, no matter it is a widget or a menu, can directly docked into `napari` viewer by simple syntax:
python
from magicclass.ext import to_napari
to_napari
magicclass
class A: ...
- Now functions can be converted into buttons or menus **after** construction of magic classes. This also follows the `magicgui`'s typing rule.
python
def func(a: int): ...
ui.Menu.append(func) this code will create a new action in Menu.
Changes
----------
- `parent_viewer` finds viewer ancestor in a safer way now. It uses `napari`'s method so that it will also work with newer `napari` in the future.
- Use pyi file to improve code completion.