Created
June 15, 2020 12:41
-
-
Save cormullion/3dea610ed8bf7e8e26768d8e21a6ed45 to your computer and use it in GitHub Desktop.
julia plots logo
This file contains 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 | |
plotpoints = Point[ | |
Point(-90.36775, 109.412), | |
Point(-17.1930000000000, 20.175), | |
Point(-60.1385, -121.20), | |
Point(29.972500000000025, -61.73075), | |
Point(109.87098, -41.90625), | |
Point(83.43848, 55.41374), | |
Point(208.39248, -38.902475), | |
Point(175.9525, -156.6477497)] | |
function arrowheadcurved(pos, w, h) | |
@layer begin | |
translate(pos) | |
polysmooth([O, # tip | |
Point(-w, -h), | |
Point(-w + h/2, 0), | |
Point(-w + h/2, 0), | |
Point(-w, h), | |
], 3, :fill) | |
end | |
end | |
function drawplotslogo() | |
for (n, pt) in enumerate(plotpoints) | |
sethue([g, p, p, r, b, g, b, r][n]) | |
circle(pt, 25, :fill) | |
end | |
sethue("black") | |
# x | |
arrow(Point(-245.0, 155), Point(200, 155), | |
linewidth=14, | |
arrowheadlength=0, | |
decoration = 1.0, | |
decorate = () -> (arrowheadcurved(O + (55, 0), 100, 45))) | |
#y | |
arrow(Point(-155, 250.0), Point(-155, -150), | |
linewidth=14, | |
arrowheadlength=0, | |
decoration = 1.0, | |
decorate = () -> (arrowheadcurved(O + (45, 0), 100, 45))) | |
end | |
r, g, b, p = [Luxor.julia_red, Luxor.julia_green, Luxor.julia_blue, Luxor.julia_purple] | |
Drawing(500, 500, "/tmp/juliaplots.svg") | |
origin() | |
sethue("white") # transparent background | |
paint() | |
@layer begin | |
translate(0, -15) | |
scale(0.75) | |
drawplotslogo() | |
end | |
finish() | |
preview() |
Author
cormullion
commented
Jun 15, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment