Skip to content

Commit 53a65c7

Browse files
committed
For #15: expand plot area slightly
Expands the x axis' lower bound to -1 and y axis' upper bound to 101 so that points lying directly at 0% divergence or 100% mAb identity are still plotted (see warning about removal of data outside limits in ?ggplot2::scale_continuous) and expands available selection area in interactive plot to match
1 parent 6c05915 commit 53a65c7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lineage/2.2-get_island_interactive.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Copyright (c) 2016 Columbia University and Vaccine Research Center, National
2929

3030

3131
#### WRAPPER FOR gglocator() TO LIMIT TO POINTS WITHIN PLOT ####
32-
getLocation <- function(xmin=0,xmax=50,ymin=50,ymax=100) {
32+
getLocation <- function(xmin=-1,xmax=50,ymin=50,ymax=101) {
3333

3434
myPoint <- data.frame( x=c(xmin-1), y=c(ymax+1) )
3535
while( myPoint$x<xmin || myPoint$x>xmax || myPoint$y<ymin || myPoint$y>ymax ) {

plottingFunctions.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ plot_all <- function (data, native, pretty, heavy, plot_title=NULL, color=TRUE,
3636
na.value="white", breaks=r, labels=signif(r/b,1),
3737
guide = guide_colorbar( title="number of\nsequences", title.theme=element_text(size=4,angle=0),
3838
barheight = unit(.5,"in"), barwidth = unit(.1,"in"), label.theme=element_text(size=3,angle=0,) ) )+
39-
theme_bw() + scale_x_continuous(expand=c(0,0),limits=c(0,50)) +
40-
scale_y_continuous(expand=c(0,1),limits=c(50,100)) +
39+
theme_bw() + scale_x_continuous(expand=c(0,0),limits=c(-1,50)) +
40+
scale_y_continuous(expand=c(0,1),limits=c(50,101)) +
4141
theme(plot.background = element_blank(),panel.grid.major = element_blank(),
4242
axis.ticks.length = unit(.02,"in"), axis.ticks = element_line(size = .5),
4343
panel.grid.minor = element_blank(), axis.text = element_text(size = 6),

0 commit comments

Comments
 (0)