Skip to content

Commit

Permalink
update colors
Browse files Browse the repository at this point in the history
  • Loading branch information
kchu25 committed Sep 12, 2024
1 parent 0c3ba7b commit da3a75b
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 783 deletions.
18 changes: 18 additions & 0 deletions src/const_glyphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,21 @@ const AA_PALETTE_negative = Dict(
"*" => "#06062d",
"" => "#158DC4",
)

arrow_color_palette = [
"#3E359C",
"#EC771B",
"#12802E",
"#6C73C2",
"#833D73",
"#C26b2F",
"#4E290F"]

# "3E359C",
# "EC771B",
# "12802E",
# "223025",
# "833D73",
# "C26b2F",
# "4E290F"
# ]
5 changes: 3 additions & 2 deletions src/helpers_shape.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ function get_arrow_basic(;line_scale=1.0, right=true, x_offset=0.0)
arrow_line_width = line_scale * 4.0
x = [0.0, arrow_line_width, arrow_line_width, line_scale * 7.5, arrow_line_width, arrow_line_width, 0.0] .+ x_offset
y = [1.05, 1.05, 1.15, 1.0, 0.85, 0.95, 0.95 ]
if right shape(x,y)
if right
return shape(x,y)
else
shape(-x, y)
return shape(-x, y)
end
end

Expand Down
12 changes: 7 additions & 5 deletions src/plot_logo_w_arr_gaps.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

@userplot ArrowPlot
@recipe function f(data::ArrowPlot)
@recipe function f(data::ArrowPlot; arrow_color_palette=nothing)
coords = data.args[1]
color --> :grey
for coord in coords

for (ind, coord) in enumerate(coords)
color_here = isnothing(arrow_color_palette) ? :grey : arrow_color_palette[ind]
for v in coord
@series begin
fill := 0
color --> color_here
lw --> 0
# label --> k
v.x, v.y
Expand Down Expand Up @@ -52,8 +54,8 @@ function logoplot_with_arrow_gaps(pfms,
logo_x_offset=logo_x_offset)
end

for col in eachcol(coords_mat)
arrowplot!(p, col)
for (ind, col) in enumerate(eachcol(coords_mat))
arrowplot!(p, col; arrow_color_palette=arrow_color_palette)
end
return p
end
Loading

0 comments on commit da3a75b

Please sign in to comment.