Plotting Antenna Pattern
I'm the author of an antenna plotting program called plot-antenna. It is written in python and has graphics backends for both, matplotlib and plotly. As of this writing the version available on pypi does not yet support different frequency resolution for pattern and impedance plots. The matplotlib backend is better when generating graphics for use in printed documentation while the plotly backend can generate interactive graphics for the web. The documentation contains some matplotlib examples, so I'm going into more detail here for the plotly backend.
I've recently added support for the "Antenna Scatterers Analysis Program" ASAP, an antenna simulation program written before the Fortran-77 Standard in 1974. It is still interesting today because it uses a formulation for the Method of Moments [1] [2] that is different from both, NEC [3] and Mininec [4]. And it pioneered the simulation of wire insulation when an antenna uses insulated elements.
In the following I'm using a 3-Element Yagi-Uda antenna that is in the Example Section of ASAP. The input file I'm using exports antenna pattern for 280 MHz to 305 MHz in 5 MHz steps. In addition it exports antenna impedance in 1 MHz steps.
When plotting, plot-antenna can use different scaling methods for the antenna pattern. The default is ARRL scaling [5] which I'm using in the following example.
The 3D plot can switch the frequency in the legend on the right side, by clicking on a frequency the display switches to the antenna pattern for that frequency. In addition on mouse-over the gain values at different positions in the 3D-plot can be seen. It is possible to zoom with the mouse wheel and turn the plot by clicking and dragging.
Of course plot-antenna can also display the conventionaly 2D plots for Azimuth and elevation:
With the 2D display in the legend on the right side, multiple traces can be enabled at once. This way it is easier to compare gain pattern than with the 3D plot where only one pattern can be shown at a time. Similar to the 3D-plot we can also see the gain values on mouse-over. It is possible to zoom (althought this is not very useful in a polar plot) and reset to the default view with the "Home" button in the menu.
Often it is useful to see the voltage standing-wave ratio and the antenna
impedance. This is achieved with the VSWR plot. In the following plot
I've turned on view of the impedance using the --swr-show-impedance
option. The vertical green line indicates the position of minimum VSWR.
Again we can see the plotted values on mouse-over. We can zoom in by
selecting a rectangle with the mouse or by using the +/- buttons in the
menu. The view can be reset to the default using the "Home" button in
the menu.
Last not least we can plot the antenna geometry. This is again a 3D plot where we can show the positions of the antenna elements on mouse-over. In the legend on the right we can turn off the visibility of the feed point (in orange). Other antennas may show a ground plane in this view or additional impedance loading on the antenna. The geometry view is very useful to check if the antenna has been modeled correctly (e.g. if the feed point is at the correct position).
The program plot-antenna currently supports output from ASAP, the
original Mininec core (written in Basic), my Python version pymininec,
and output of NEC-2. The format is auto-detected. In addition, with the
companion-program plot-eznec
, the gain pattern exported from EZNEC
can be displayed. As of this writing there is a not-yet released
version that can also display VSWR plots using the data exported by
EZNEC when plotting VSWR in a file called LastZ.txt
.