bokeh/rbokeh

Issue with x_range (and y_range) breaking ly_abline

joj3810 opened this issue · 0 comments

(Using 0.5.1)
I've just come across an issue using ly_abline together with x_range when plotting a discrete axis.

Plotting an abline (using h or v) works fine when x_range is not called, but when I add in x_range in order to set the order, only a small section of the horizontal abline gets plotted (i.e. it no longer traverses the entire width of the plot). I've seen the issue with ly_bar and ly_points plots and it affects both x_range and y_range.

capture
Reproducible example:

#Set up data frame
set.seed(2)
test_frame <- data.frame("factor_x"=sample(letters,10),"data_x"=sample(10:30,10))

#This works fine..
figure(test_frame) %>% ly_bar(x=factor_x,y=data_x) %>% ly_abline(h=15) 

#..but when x_range is added, the issue appears
figure(test_frame) %>% ly_bar(x=factor_x,y=data_x) %>% ly_abline(h=15) %>% x_range(test_frame$factor_x)