Closed jonchang closed 9 years ago
Hi Jonathan, I agree that one should be able to use the same color scale while plotting across a number of phylorate plots. But that ability already exists. If you look in the examples for plot.bammdata, you can see a demonstration of this. Does your suggested change allow for another scenario that I am not thinking of?
Hi Pascal
Yes so let's say that I'm making the first of many plots and I want the color to all range from [0, 0.5]
library(BAMMtools)
data(whales, events.whales)
ed <- getEventData(whales, events.whales, burnin=0.25)
xx <- plot.bammdata(ed, color.interval=c(0,0.5))
This fails with the error Supplied color.interval is out of bounds.
Which is true, the color interval is out of bounds, but it should still be able to color the tree according to that scale. This PR fixes that.
Ok, this makes sense to me. As it's an override, I agree that one should be able to supply any value.
If you want to color your rates outside of the range you should be allowed to. This makes it easier to program against BAMM to say, create a bunch of phylorate plots in a loop using the same color scale.