In [1]:
using GainPatterns

In [2]:
angles = [0:359]
gains = float(cosd(angles))
gp = GainPattern(angles, gains)
plot(gp)


Out[2]:

Now say you want to make the minimum y (radial) value -2, and not -1. You can specify this:


In [3]:
plot(gp, ymin=-2)


Out[3]:

Notice how the plot is always closed? We only have values for angles 0 to 359, but there is a line between 359 and zero. That is because GainPatterns automatically draws a line between the last point and the first point, to make the gain pattern look continuous over all angles

Sometimes, this behavior is undesirable. For example, maybe you get more than one revolution of data; maybe you start measuring gains at 45 degrees and loop all the way around to 47 degrees. It might be silly to draw a line connecting the last and first points in such a case. For these situations (or any time you'd like), you can set the optional argument lastleg to false when plotting.


In [5]:
angles = [0:10:359]
gains = float(cosd(angles))
gp = GainPattern(angles, gains)
plot(gp, lastleg=false)


Out[5]:

In [ ]: