INNER CODE UNIT · Python

test_plot_style

aeturrell/coding-for-economists · utilities.py:13

def test_plot_style():
    plt.style.use("plot_style.txt")
    np.random.seed(402)
    x = np.random.uniform(10, 1e5, 11)
    y = np.random.uniform(10, 1e3, 11)
    fig, ax = plt.subplots()
    ax.set_title("This is a title")
    ax.scatter(
        np.sort(x),
        y,
        s=100,
        zorder=2,
        c=[
            "#bc80bd",
            "#fb8072",
            "#b3de69",
            "#fdb462",
            "#fccde5",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…