''' Making plots pretty Matplotlib provides some possibilities of personalising your plots. In this exercise, we will explore some of these options. We will work with a function f(x) = sqrt{4*D*t} for the root mean squared distance (in micrometers) of a random walk, and two averaged measurements of particles, which will have deviations from the ideal mathematical function. We will create the data using the `np.random.normal()` command, which will introduce noise into our perfect function. `np.random.normal()` creates a random number, where the probability of a number being chosen is determined by a normal distribution. ''' import matplotlib.pyplot as plt import numpy as np time = np.linspace(0, 50, 50) calculated_rmsd = np.sqrt(4 * 15 * time) measured_1 = calculated_rmsd + np.random.normal(0, 2, len(time)) measured_2 = calculated_rmsd + np.random.normal(0, 2, len(time)) ''' First, create a regular plot of the three trajectories. Don't forget to label the axes and create a legend. ''' # Your code here ''' There are several ways to enhance this plot. 1. Plot size: You can specify plot size using the command `plt.figure(figsize=(a,b))` before plotting, where (a,b) gives the size of each edge. Experiment with the size of your plot and choose an appropriate sizing for your plot. 2. Alter colour by adding `color = "colour name"` to the `plt.plot()` command. List of named colours in matplotlib: https://matplotlib.org/stable/gallery/color/named_colors.html 3. Alter linewidth by adding `linewidth = a` to the `plt.plot()` command, where `a` gives the width of the line in points. 4. Change the linestyle using `linestyle = "style"` to the `plt.plot()` command. List of linestyles: https://matplotlib.org/stable/gallery/lines_bars_and_markers/linestyles.html Advanced: Introducing special characters in axis labels: In this example, the `y`-axis has been labelled using `plt.ylabel("distance [um]")` to indicate that the axis measures distance, in micrometers. However, we can also make the label show the character for micro (or almost any other character). For that, we use `plt.ylabel(r"distance $[\mu m]$")`. Here, we put the special characters between dollar signs ($), and then use \mu to get the greek letter mu. Similarly, we can get any other greek letter. For those familiar with Latex, we can also put equations into labels using LateX formalism. ''' # Your code for pretty matplotlib plot