trackGIF | R Documentation |
The trackGIF function creates a GIF showing the track of the animal for a specific trial.
trackGIF(
data,
id,
day,
trial,
centerx,
centery,
radius = 75,
platformx,
platformy,
platformradius = 7.5,
ndata_circle = 100,
quadrant_colours = c("white", "white", "white", "white"),
quadrants_alpha = 0.2,
platform_alpha = 1,
platform_colour = "black",
platform_line_size = 0.5,
platform_linetype = "solid",
platform_line_colour = "black",
track_colour = "orange",
track_alpha = 0.35,
loop = FALSE,
width = 480,
height = 480,
fps = 10,
duration = 10,
theme_settings = NULL,
title = NA,
show_time = FALSE,
plot_original_platform = FALSE,
original_platformx = NULL,
original_platformy = NULL,
original_platform_colour = "grey",
original_platform_alpha = 0.4,
original_platform_linetype = "dotted",
original_platform_line_size = 0.5,
original_platform_line_colour = "black"
)
data |
Data set containing at least following columns: "Time", "x", "y", "Animal", "Day", "Trial". "x" and "y" represent the coordinates (position) of the animal at a certain timepoint ("Time") during the trial. |
id |
ID of the animal |
day |
day number |
trial |
trial number |
centerx |
x coordinate of the center of the morris water maze (cm) |
centery |
y coordinate of the center of the morris water maze (cl) |
radius |
radius of the morris water maze (cm), default = 75 |
platformx |
x coordinate of the center of the platform (cm) |
platformy |
y coordinate of the center of the platform (cm) |
platformradius |
radius of the platform (cm), default = 7.5 |
ndata_circle |
Number of data points in the circle data set. Higher means smoother (more perfect) circle. Default = 100 |
quadrant_colours |
Fill colours of quadrants. Order = top left, top right, bottom left, bottom right. Name or hexadecimal code (e.g.: #FF1020). Default = c("white","white","white","white") |
quadrants_alpha |
Alpha level for quadrants. Default = 0.2 |
platform_alpha |
Alpha level for platform. Default = 1 |
platform_colour |
Colour of the platform. Name or hexadecimal code (e.g.: #FF1020). Default = "black" |
platform_line_size |
Size of platform circle. Default = 0.5 |
platform_linetype |
Linetype of platform circle. Default = "solid" |
platform_line_colour |
Colour of platform circle line. Default = "black" |
track_colour |
Colour of the track line. Name or hexadecimal code (e.g.: #FF1020). Default = orange |
track_alpha |
Alpha level for the track line. Default = 0.35 |
loop |
Loop the animation, default = FALSE |
width |
Width of the animation (px), default = 480 |
height |
Height of the animation (px), default = 480 |
fps |
Frames per second of the animation. default = 10 |
duration |
Duration of the animation(s), default = 10 |
theme_settings |
Optional parameter that passes list of arguments to ggplot2's theme() function. |
title |
Add title to GIF. Default = NA |
show_time |
Shows trial time (s) as subtitle (ggplot). Default = FALSE |
plot_original_platform |
Plot the original platform (for reversal trials). Default = FALSE |
original_platformx |
x coordinate of the center of the original platform (cm). Ignored if plot_original_platform = FALSE |
original_platformy |
y coordinate of the center of the original platform (cm). Ignored if plot_original_platform = FALSE |
original_platform_colour |
Colour of the original platform. Name or hexadecimal code (e.g.: #FF1020). Ignored if plot_original_platform = FALSE. Default = "grey" |
original_platform_alpha |
Alpha level for original platform. Ignored if plot_original_platform = FALSE. Default = 0.4 |
original_platform_linetype |
Linetype of original platform circle. Ignored if plot_original_platform = FALSE. Default = "dotted" |
original_platform_line_size |
Size of original platform circle. Ignored if plot_original_platform = FALSE. Default = 0.5 |
original_platform_line_colour |
Colour of original platform circle line. Ignored if plot_original_platform = FALSE. Default = "black" |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.