Skip to content

Commit

Permalink
GUI ratio and divergent plots: red is now high
Browse files Browse the repository at this point in the history
This makes the colours consistent with the z-score
and p-rank plotting.
  • Loading branch information
shawnlaffan committed Dec 4, 2023
1 parent 97d692c commit 5a636e1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/Biodiverse/GUI/Legend.pm
Original file line number Diff line number Diff line change
Expand Up @@ -674,12 +674,12 @@ sub get_colour_divergent {

my $colour;
my @arr_cen = (0xff, 0xff, 0xbf);
my @arr_lo = (0x45, 0x75, 0xb4); # blue
my @arr_hi = (0xd7, 0x30, 0x27); # red
my @arr_hi = (0x45, 0x75, 0xb4); # blue
my @arr_lo = (0xd7, 0x30, 0x27); # red

if ($self->get_invert_colours) {
@arr_hi = (0x45, 0x75, 0xb4); # blue
@arr_lo = (0xd7, 0x30, 0x27); # red
@arr_lo = (0x45, 0x75, 0xb4); # blue
@arr_hi = (0xd7, 0x30, 0x27); # red
}

$max_dist = abs $max_dist;
Expand Down Expand Up @@ -723,12 +723,12 @@ sub get_colour_ratio {
}

my @arr_cen = (0xff, 0xff, 0xbf);
my @arr_lo = (0x45, 0x75, 0xb4); # blue
my @arr_hi = (0xd7, 0x30, 0x27); # red
my @arr_hi = (0x45, 0x75, 0xb4); # blue
my @arr_lo = (0xd7, 0x30, 0x27); # red

if ($self->get_invert_colours) {
@arr_hi = (0x45, 0x75, 0xb4); # blue
@arr_lo = (0xd7, 0x30, 0x27); # red
@arr_lo = (0x45, 0x75, 0xb4); # blue
@arr_hi = (0xd7, 0x30, 0x27); # red
}

# ensure fractions get correct scaling
Expand Down

0 comments on commit 5a636e1

Please sign in to comment.