comparison docs/logo.jl @ 1857:ffde7dad9da5 feature/documenter_logo

Add a logo to the documentation
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 21 Jan 2022 15:23:08 +0100
parents
children
comparison
equal deleted inserted replaced
864:9a2776352c2a 1857:ffde7dad9da5
1 using Plots
2 using Colors
3
4 logocolors = Colors.JULIA_LOGO_COLORS
5
6 gr()
7 # pgfplotsx()
8
9 polar(r,θ) = (r*cos(θ), r*sin(θ))
10
11 plt = plot(;
12 xlim=(-1,1),
13 ylim=(-1,1),
14 aspect_ratio=1.,
15 legend=false,
16 axis=([],false),
17 grid=false,
18 dpi=600,
19 size=(250,250),
20 background_color = :transparent,
21 )
22
23 origo = (0,0);
24 r = 0.6
25
26 markersize=24
27 markerstrokewidth=3
28 markerstrokecolor=colorant"#333"
29
30 for θ ∈ π/2 .+ 2π/3*(0:2)
31 plot!([origo, polar(r,θ)];
32 color = colorant"#ccc",
33 linewidth=4,
34 )
35 end
36
37 scatter!(origo;
38 color = logocolors.blue,
39 markersize,
40 markerstrokewidth,
41 markerstrokecolor,
42 )
43
44
45 colors = [logocolors.green, logocolors.red, logocolors.purple]
46
47 for i ∈ 0:2
48 θ = π/2 + 2π/3*i
49 scatter!(polar(r,θ);
50 color = colors[i+1],
51 markersize,
52 markerstrokewidth,
53 markerstrokecolor,
54 )
55 end
56
57
58
59
60
61
62
63 plt2 = plot(;
64 xlim=(-1,1),
65 ylim=(-1,1),
66 aspect_ratio=1.,
67 legend=false,
68 axis=([],false),
69 grid=false,
70 dpi=600,
71 size=(300,300),
72 background_color = :transparent
73 )
74
75 origo = (0,0);
76
77 r = 0.6
78 markersize=24
79 markerstrokewidth=3
80 markerstrokecolor=colorant"#333"
81
82 for θ ∈ 2π/4*(0:3)
83 plot!([origo, polar(r,θ)];
84 color = colorant"#CCC",
85 linewidth=4,
86 )
87 end
88
89 scatter!(origo;
90 color = colorant"#FFF",
91 markersize,
92 markerstrokewidth,
93 markerstrokecolor,
94 )
95
96
97 colors = [logocolors.blue, logocolors.red, logocolors.green, logocolors.purple]
98
99 for i ∈ 0:3
100 θ = 2π/4*i
101 scatter!(polar(r,θ);
102 color = colors[i+1],
103 markersize,
104 markerstrokewidth,
105 markerstrokecolor,
106 )
107 end
108
109 savefig(plt, "tri.png")
110 savefig(plt2, "quad.png")
111 savefig(plt, "logo.svg")