Skip to content

Instantly share code, notes, and snippets.

View briochemc's full-sized avatar

Benoît Pasquier briochemc

View GitHub Profile
@soxofaan
soxofaan / README.md
Last active January 19, 2024 17:48
Simple pretty CSV and TSV file viewer.
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]
using AbstractPlotting
using AbstractPlotting.MakieLayout
using GLMakie; GLMakie.activate!()
GLMakie.GLFW.WindowHint(GLMakie.GLFW.FLOATING, 1)
using LinearAlgebra
##
scene = Scene(center = false, raw = true, resolution = (800, 800))
@jkrumbiegel
jkrumbiegel / makie_sankey.jl
Created March 12, 2022 13:25
sankey makie
function sankey!(target, x1, x2, bend, start_min, start_max, stop_min, stop_max, color_start, color_stop)
bezier(t, p1, p2, p3, p4) = (1 - t)^3 * p1 + 3(1 - t)^2 * t * p2 + 3 * (1 - t) * t^2 * p3 + t^3 * p4
b(t, start, stop) = begin
p_start = Point2f(x1, start)
p_stop = Point2f(x2, stop)
c1 = Point2f(x1 + bend * (x2-x1), start)
c2 = Point2f(x2 - bend * (x2-x1), stop)
bezier(t, p_start, c1, c2, p_stop)
end
@rsignell-usgs
rsignell-usgs / conservative_regrid_geopandas.ipynb
Created November 8, 2022 19:37
conservative_regrid_geopandas.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.