Created
November 25, 2015 13:25
-
-
Save lbrito1/690809f54f217e6f6b9f to your computer and use it in GitHub Desktop.
Bokeh desired_num_ticks interaction with custom x_range
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from bokeh.plotting import figure, show, output_file | |
x = range(0,100) | |
y = x | |
output_file("line.html", title="line.py example") | |
# p = figure(title="simple line example") # Works fine | |
p = figure(title="simple line example", x_range=map(lambda a: str(a), x)) # Doesn't work | |
p.line(x,y, color="#2222aa", line_width=2) | |
p.xgrid[0].ticker.desired_num_ticks = 3 | |
show(p) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment