Skip to content

Instantly share code, notes, and snippets.

View maritrinez's full-sized avatar

Beatriz Martínez maritrinez

View GitHub Profile
function qBPath(sx, sy, tx, ty) {
var curve = ((tx-sx) * 0.05),
path = "";
path += "Q " + (sx) + "," + (sy+curve) + " " + ((sx+tx)/2) +","+ ((sy+ty)/2);
path += "Q " + (tx) + "," + (ty-curve) + " " + tx + "," + ty;
return path;
}
path += 'M ' + source_left_offset + ',0'
path += qBPath(source_left_offset, 0, target_x - padding, baseline_y)
@waldyrious
waldyrious / typefaces.md
Last active May 19, 2018 16:49
History & classification of typefaces

Notes

  • 1450: Blackletter (Johannes Gutenberg)
  • Roman / Serif (Nicloas Jenson)
    • italics (Aldus Manutius)
    • 1530s: Old Style (William Caslon): thick serifs, low contrast between thick & theen strokes
    • 1750s: Transitional (John Baskerville)
    • 1784: Modern (Didot, 1767 "Bodoni", Giambattista Bodoni)
    • 1815: Slab Serif (advertising)
  • 1816: Sans Serif (William Caslon IV)
  • Geometric Sans (1927 "Futura", Paul Renner): simple geometric shapes
@dsparks
dsparks / tapered-intensity-curved_edges.R
Last active December 8, 2021 12:23
Beautiful tapered-intensity-curved edge network graph with ggplot2
doInstall <- TRUE # Change to FALSE if you don't want packages installed.
toInstall <- c("sna", "ggplot2", "Hmisc", "reshape2")
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
# Empty ggplot2 theme
new_theme_empty <- theme_bw()
new_theme_empty$line <- element_blank()
new_theme_empty$rect <- element_blank()
new_theme_empty$strip.text <- element_blank()
@MoritzStefaner
MoritzStefaner / .block
Last active January 20, 2020 10:46
Force-based label placement
license: apache-2.0