The below example is just to show how such a plugin could be done. It is worth to mention that in most cases it would be more efficient to duplicate an existing Horizontal/Vertical antenna of the antenna library, modify the pattern and rename it accordingly.
Figure 336: Simple example for static pattern
Figure 337: Configuration panel of the AP example with static pre-set of the antenna pattern
Figure 338: Example of (random) antenna pattern