# -*- coding: utf-8 -*-
# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .jl
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Julia 1.6.2
#     language: julia
#     name: julia-1.6
# ---

# # Exercises: Plotting

# ### Installing a package: `Primes`
#
# Load the `Primes` packages (source code at https://github.com/JuliaMath/Primes.jl). 
#
# Verify that you can now use the function `primes` to grab all the primes under `100`. If unsure, maybe `?primes` will help you?

using Pkg
# use Pkg to "add" the package "Primes"

using Primes
BLANK

# ### Simple plots
#
# Given `x = -10:10` plot y vs. x for 
# $
# y=x^2
# $

# +
using Plots

x = -10:10
y = BLANK
plot(BLANK)
# -

# ### Mount Bruno
#
# Let's visualize Mount Bruno! 
#
# Read the 2D topological data of Mount Bruno from the file `../data/bruno.csv`. Next we need some plotting engine for `Plots`, I recommend `Plotly`/`PlotlyJS` for this task. As a final touch, see what `surface()` function can do with your array.



# ## Advanced: Animations
#
# Create an animation of our epidemic simulation. Fill in the skeleton code below with the plotting functions.

# The following two lines load the epidemic functions from a file
include("../epidemic_simple.jl")

# +
using Plots

# Set the size of the animation window
default(size = (400, 300))

# The map of cells (a 2D array)
cells = make_cells(64, 64)

# Build the animation frames by running simulation steps and generating a plot
anim = @animate for i ∈ 1:50
    # run update function here
    BLANK

    # Then call plot to create a frame
    plot(BLANK, legend=false, border=:none)
end

gif(anim, "pandemic.gif", fps = 5)

StarcoderdataJupyterScriptsDedupFiltered