{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Plotting behavorial data generated by OpenSesame" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In the data wrangling tutorial we covered how to import and manipulate a dataframe. We also saw some ways to get an idea how your data looks like by grouping the data. In this tutorial we will go a step further by also visualizing the data. Therefore, we will use python's most widely used visualization package: [matplotlib](https://matplotlib.org/). Let's first load the data. We will use the same data as in the data wrangling tutorial." ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": " subject_nr block session congruency_transition_type congruency_type \\\n0 1 1 lowswitch NaN incongruent \n1 1 1 lowswitch congruency-switch congruent \n2 1 1 lowswitch congruency-repetition congruent \n3 1 1 lowswitch congruency-switch incongruent \n4 1 1 lowswitch congruency-repetition incongruent \n5 1 1 lowswitch congruency-repetition incongruent \n6 1 1 lowswitch congruency-repetition incongruent \n7 1 1 lowswitch congruency-switch congruent \n8 1 1 lowswitch congruency-repetition congruent \n9 1 1 lowswitch congruency-repetition congruent \n\n correct response_time task_transition_type task_type response \n0 0 1483 NaN parity None \n1 1 707 task-switch magnitude a \n2 1 856 task-switch parity a \n3 1 868 task-repetition parity a \n4 1 1079 task-switch magnitude a \n5 1 819 task-repetition magnitude a \n6 0 1481 task-switch parity None \n7 0 1483 task-repetition parity None \n8 1 805 task-repetition parity a \n9 1 848 task-repetition parity a ", "text/html": "
\n | subject_nr | \nblock | \nsession | \ncongruency_transition_type | \ncongruency_type | \ncorrect | \nresponse_time | \ntask_transition_type | \ntask_type | \nresponse | \n
---|---|---|---|---|---|---|---|---|---|---|
0 | \n1 | \n1 | \nlowswitch | \nNaN | \nincongruent | \n0 | \n1483 | \nNaN | \nparity | \nNone | \n
1 | \n1 | \n1 | \nlowswitch | \ncongruency-switch | \ncongruent | \n1 | \n707 | \ntask-switch | \nmagnitude | \na | \n
2 | \n1 | \n1 | \nlowswitch | \ncongruency-repetition | \ncongruent | \n1 | \n856 | \ntask-switch | \nparity | \na | \n
3 | \n1 | \n1 | \nlowswitch | \ncongruency-switch | \nincongruent | \n1 | \n868 | \ntask-repetition | \nparity | \na | \n
4 | \n1 | \n1 | \nlowswitch | \ncongruency-repetition | \nincongruent | \n1 | \n1079 | \ntask-switch | \nmagnitude | \na | \n
5 | \n1 | \n1 | \nlowswitch | \ncongruency-repetition | \nincongruent | \n1 | \n819 | \ntask-repetition | \nmagnitude | \na | \n
6 | \n1 | \n1 | \nlowswitch | \ncongruency-repetition | \nincongruent | \n0 | \n1481 | \ntask-switch | \nparity | \nNone | \n
7 | \n1 | \n1 | \nlowswitch | \ncongruency-switch | \ncongruent | \n0 | \n1483 | \ntask-repetition | \nparity | \nNone | \n
8 | \n1 | \n1 | \nlowswitch | \ncongruency-repetition | \ncongruent | \n1 | \n805 | \ntask-repetition | \nparity | \na | \n
9 | \n1 | \n1 | \nlowswitch | \ncongruency-repetition | \ncongruent | \n1 | \n848 | \ntask-repetition | \nparity | \na | \n