Skip to content

Commit

Permalink
Added title to measure analysis plot, and included recording frequenc…
Browse files Browse the repository at this point in the history
…y in subtitles of detection overview plot
  • Loading branch information
Thomahawkuru committed Jul 15, 2021
1 parent db78396 commit 436ed81
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
Functions for helping with plotting of various figures and data
"""

def detection(x, y, t, v, fixations, saccades, pursuits, blinks, trials, trial, axs):
def detection(x, y, t, v, fixations, saccades, pursuits, blinks, trials, trial, axs, hz):
if trials > 1:
axs1 = axs[trial - 1]
else:
axs1 = axs
axs1.set_title('Trial ' + str(trial))

hz = round(hz)
axs1.set_title('Trial {}, recorded at {}hz'.format(trial,hz))
axs1.set_xlabel('Time [s]')

axs1.plot(t, v, 'silver', label="Velocity")
Expand All @@ -39,7 +41,7 @@ def detection(x, y, t, v, fixations, saccades, pursuits, blinks, trials, trial,

def calculation(fixations, saccades, pursuits, blinks, trial, participant):
plt.figure(trial + 1, figsize=[25.60, 14.40])

plt.suptitle('Gaze event analysis for participant {}, trail {}'.format(participant, trial))
if fixations.any():
plt.subplot(4, 4, 1)
histogramreighley(fixations[:, 2])
Expand Down

0 comments on commit 436ed81

Please sign in to comment.