added efishtitle with two fish

This commit is contained in:
Jan Benda 2021-04-02 09:30:28 +02:00
parent 2a9c01db5d
commit 890c0b0a9b
2 changed files with 22 additions and 0 deletions

Binary file not shown.

View File

@ -154,6 +154,27 @@ def plot_threewavefish(ax):
ax.set_aspect('equal') ax.set_aspect('equal')
def plot_twowavefishside(ax):
maxx = 30.0
maxy = maxx * aspect_ratio(ax)
x = np.linspace(-maxx, maxx, 600)
y = np.linspace(-maxy, maxy, 200)
xx, yy = np.meshgrid(x, y)
fish1 = (('Alepto_male', 'side'), (-12, 0), (1, 0.2), 23.0, 15)
fish2 = (('Alepto', 'top'), (14, -1.5), (1.0, 0.45), 23.0, -20)
poles1 = efish_monopoles(*fish1[1:])
poles2 = efish_monopoles(*fish2[1:])
pot = epotential_meshgrid(xx, yy, None, poles1, poles2)
mz = 0.65
zz = squareroot_transform(pot/200, mz)
levels = np.linspace(-mz, mz, 16)
ax.contourf(x, y, -zz, levels)
ax.contour(x, y, -zz, levels, **csLine)
plot_fish(ax, *fish1, bodykwargs=fishBody, finkwargs=fishFins)
plot_fish(ax, *fish2, bodykwargs=fishBody, finkwargs=fishFins)
ax.set_aspect('equal')
if __name__ == "__main__": if __name__ == "__main__":
# hide spines: # hide spines:
plt.rcParams['axes.spines.left'] = False plt.rcParams['axes.spines.left'] = False
@ -172,4 +193,5 @@ if __name__ == "__main__":
fig, ax = plt.subplots(figsize=(15.2/2.54, 4.0/2.54)) fig, ax = plt.subplots(figsize=(15.2/2.54, 4.0/2.54))
fig.subplots_adjust(left=0, right=1, top=1, bottom=0) fig.subplots_adjust(left=0, right=1, top=1, bottom=0)
plot_threewavefish(ax) plot_threewavefish(ax)
#plot_twowavefishside(ax)
fig.savefig('efishtitle.pdf') fig.savefig('efishtitle.pdf')