Inline Backend on Retina Displays

On higher resolution screens such as Retina displays that come with Macbooks, the default images in notes books can look blurry.

Use %config InlineBackend.figure_format = 'retina' after %matplotlib inline to render higher resolution images.

In jupyter notebook, the visuals will render the same size, but higher resolution. In these HTML-converted notes, the image will render larger.

%matplotlib inline

import matplotlib.pyplot as plt
import numpy as np
def plot_function():
    x = np.linspace(0, 1, 300)
    for w in range(2, 6, 2):
        plt.plot(x, np.sin(np.pi*x)*np.sin(2*w*np.pi*x))


%config InlineBackend.figure_format = 'retina'