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 335: Simple example for static pattern
Figure 336: Configuration panel of the AP example with static pre-set of the antenna pattern
Figure 337: Example of (random) antenna pattern