This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using AbstractPlotting | |
| using MakieLayout | |
| using GLMakie; GLMakie.activate!() | |
| GLMakie.GLFW.WindowHint(GLMakie.GLFW.FLOATING, 1) | |
| using LinearAlgebra | |
| ## | |
| scene = Scene(center = false, raw = true, resolution = (800, 800)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using HTTP, CSV, Plots, DataFrames, Dates | |
| # Download the data | |
| df = CSV.read(IOBuffer(String(HTTP.get("https://covid.ourworldindata.org/data/total_cases.csv").body)), normalizenames=true) | |
| # Plotting function | |
| function doit(df, countries, alignment) | |
| cp = get_color_palette(:auto, plot_color(:white), length(countries)) | |
| plot(legend=false) | |
| for (i,country) in enumerate(countries) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Luxor, Colors | |
| function main(fname) | |
| Drawing(600, 600, fname) | |
| origin() | |
| circle(O, 290, :clip) | |
| sethue("white") | |
| paint() | |
| colors = [Luxor.julia_blue, Luxor.julia_red, Luxor.julia_green, Luxor.julia_purple] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NEIGHBORS_MAP = { | |
| 0: (0, 0, 0, 0, 1, 0, 1, 0, 0, 0), | |
| 1: (0, 0, 0, 0, 0, 0, 1, 0, 1, 0), | |
| 2: (0, 0, 0, 0, 0, 0, 0, 1, 0, 1), | |
| 3: (0, 0, 0, 0, 1, 0, 0, 0, 1, 0), | |
| 4: (1, 0, 0, 1, 0, 0, 0, 0, 0, 1), | |
| 5: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 6: (1, 1, 0, 0, 0, 0, 0, 1, 0, 0), | |
| 7: (0, 0, 1, 0, 0, 0, 1, 0, 0, 0), | |
| 8: (0, 1, 0, 1, 0, 0, 0, 0, 0 ,0), |