Description Usage Arguments See Also Examples
Update y axis range in a Bokeh figure
1 |
fig |
figure to modify |
dat |
either a vector (min, max) if the axis is numeric, or a vector of values if the axis is categorical. In the latter case, the order in which the values are supplied is how they will be arranged on the axis. |
callback |
TODO |
Other ranges:
x_range()
1 2 3 4 5 6 7 8 9 10 11 12 13 | # get data from Duluth site in 'barley' data
du <- subset(lattice::barley, site == "Duluth")
# plot with default ranges
p <- figure(width = 600) %>%
ly_points(yield, variety, color = year, data = du)
p
# y axis is alphabetical
# manually set x and y axis (y in order of 1932 yield)
p %>%
x_range(c(20, 40)) %>%
y_range(du$variety[order(subset(du, year == 1932)$yield)])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.