Plots

Plots over time

For an aggregate view of your variable of interest over time, use the .plot_overtime() method to visualise the mean variable over your given time frame or split it into sub groups using the information in your metadata.

# If wrapped is True each specimens data will be aggregated to one 24 day before being aggregated as a whole. If you want to view each day seperately, keep wrapped False.
# A moving average is applied to the data with a window of 30 (30 mins if your time delta is 60 seconds). This can be changed with the parameter avg_window 

df.plot_overtime(
variable = 'moving',
wrapped = True,
avg_window = 30
)

# the plots will show the mean with 95% confidence intervals in a lighter colour around the mean
A plot of movement aggregated to 24 hours using the .plot_overtime() method

Quantifying the above

The plots above look nice, but we often want to quantify the differences to prove what our eyes are telling us. The method .plot_quantify() plots the mean and 95% CI of the specimens to give a strong visual indication of group differences.

Quantification of the Drosophila species movement
circle-info

If working in a python file workspace the plots should open automatically in your browser as a fully interactable plot. If in a jupyter notebook it'll appear below the cell.

You can save the plots as a pdf for the best resolution or as html file to fully interact with it in the browser.

See a few pages down for examples on how to do this

Last updated