adding plots to poster

This commit is contained in:
wendtalexander 2023-01-24 23:39:38 +01:00
parent c070192996
commit 4b5aec2e65
4 changed files with 89 additions and 81 deletions

View File

@ -20,9 +20,10 @@ logger = makeLogger(__name__)
def main(datapath: str):
foldernames = [datapath + x + '/' for x in os.listdir(datapath) if os.path.isdir(datapath+x)]
for foldername in foldernames:
if foldername == '../data/mount_data/2020-05-12-10_00/':
continue
#for foldername in foldernames:
foldername = foldernames[0]
# if foldername == '../data/mount_data/2020-05-12-10_00/':
# continue
# behabvior is pandas dataframe with all the data
bh = Behavior(foldername)
@ -46,7 +47,7 @@ def main(datapath: str):
fish1_color = ps.red
fish2_color = ps.orange
fig, ax = plt.subplots(4, 1, figsize=(10, 5), height_ratios=[0.5, 0.5, 0.5, 6], sharex=True)
fig, ax = plt.subplots(4, 1, figsize=(28*ps.cm, 13*ps.cm), height_ratios=[0.5, 0.5, 0.5, 6], sharex=True)
# marker size
s = 200
ax[0].scatter(physical_contact, np.ones(len(physical_contact)), color='firebrick', marker='|', s=s)
@ -97,10 +98,12 @@ def main(datapath: str):
ax[3].set_ylabel('EODf')
ax[3].set_xlabel('Time [h]')
ax[0].set_title(foldername.split('/')[-2])
#ax[0].set_title(foldername.split('/')[-2])
# 2020-03-31-9_59
plt.subplots_adjust(left=0.13, right=0.987, top=0.97)
plt.savefig('../poster/figs/timeline.pdf')
plt.show()
embed()
# plot chirps

BIN
poster/figs/timeline.pdf Normal file

Binary file not shown.

Binary file not shown.

View File

@ -38,7 +38,12 @@ blockverticalspace=2mm, colspace=20mm, subcolspace=0mm]{tikzposter} %Default val
\myblock[TranspBlock]{Chirps during competition}{
\begin{tikzfigure}[]
\label{fig:example_b}
\includegraphics[width=0.5\linewidth]{example-image-b}
\includegraphics[width=\linewidth]{figs/timeline.pdf}
\end{tikzfigure}
\noindent
\begin{tikzfigure}[]
\label{fig:example_b}
\includegraphics[width=\linewidth]{figs/chirps_winner_loser.pdf}
\end{tikzfigure}
\noindent
}