title = "2013 Sunrise and Sunset times in Warsaw" p. timestamp () * 1000, dimension = 'height', line_color = 'red', line_dash = 'dashed', line_width = 3 ) p. timestamp () * 1000, dimension = 'height', line_color = 'green', line_dash = 'dashed', line_width = 3 ) daylight_savings_end = Span ( location = dt ( 2013, 10, 27, 3, 0, 0 ). Sunrise, line_dash = 'dotted', line_width = 2, legend = "Sunrise" ) daylight_savings_start = Span ( location = dt ( 2013, 3, 31, 2, 0, 0 ). Sunset, line_dash = 'solid', line_width = 2, legend = "Sunset" ) p. axis_label = 'Value' show ( p )įrom datetime import datetime as dt from import daylight_warsaw_2013 from otting import figure, show, output_file from bokeh.models import Span output_file ( "span.html", title = "span.py example" ) p = figure ( x_axis_type = "datetime", y_axis_type = "datetime" ) p. 1 Answer Sorted by: 0 Assuming that by omitting zoom it defaults to 12, and given the limited information, an approach would be as follows: def getoutermarkers (markersource): read dataset process dataset. to_series (), data, line_color = "gray", line_width = 1, legend = "glucose" ) low_box = BoxAnnotation ( plot = p, top = 80, fill_alpha = 0.1, fill_color = 'red' ) mid_box = BoxAnnotation ( plot = p, bottom = 80, top = 180, fill_alpha = 0.1, fill_color = 'green' ) high_box = BoxAnnotation ( plot = p, bottom = 180, fill_alpha = 0.1, fill_color = 'red' ) p. ix p = figure ( x_axis_type = "datetime", tools = TOOLS ) p. Example source: tests/glyphs/Asterisk.py JSON Prototype class Circle (kwargs) Bases: Render circle markers. class Asterisk (kwargs) Bases: Render asterisk ‘’ markers. From import data from otting import figure, show, output_file from bokeh.models import BoxAnnotation output_file ( "box_annotation.html", title = "box_annotation.py example" ) TOOLS = "pan,wheel_zoom,box_zoom,reset,save" #reduce data size data = data. Glyph renderer models for displaying simple scatter-type markers on Bokeh plots.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |