![]() circle ( jitter ( "class", 0.3, range = p. quantile ( 0.20 ) source = ColumnDataSource ( data = dict ( base = classes, upper = upper, lower = lower )) error = Whisker ( base = "base", upper = "upper", lower = "lower", source = source, level = "annotation", line_width = 2 ) error. unique ())) p = figure ( height = 400, x_range = classes, background_fill_color = "#efefef", title = "Car class vs HWY mpg with quintile ranges" ) p. grid_line_color = None show ( p )įrom bokeh.models import ColumnDataSource, Whisker from otting import figure, show from 2 import autompg2 as df from ansform import factor_cmap, jitter classes = list ( sorted ( df. line ( "Date", "Sunrise", source = daylight_warsaw_2013, color = 'orange', legend_label = "Sunrise" ) dst_start = Span ( location = dt ( 2013, 3, 31, 2, 0, 0 ), dimension = 'height', line_color = '#009E73', line_width = 5 ) p. line ( "Date", "Sunset", source = daylight_warsaw_2013, color = 'navy', legend_label = "Sunset" ) p. add_layout ( band ) show ( p )įrom datetime import datetime as dt from bokeh.models import Span from otting import figure, show from import daylight_warsaw_2013 p = figure ( height = 350, x_axis_type = "datetime", y_axis_type = "datetime", title = "2013 Sunrise and Sunset in Warsaw with DST dates marked", y_axis_label = "Time of Day", background_fill_color = "#fafafa" ,) p. line ( "x", "y_mean", line_dash = ( 10, 7 ), line_width = 2, source = source ) band = Band ( base = "x", lower = "lower", upper = "upper", source = source, fill_alpha = 0.3, fill_color = "gray", line_color = "black" ) p. ![]() scatter ( x = "x", y = "y", marker = "dot", size = 10, alpha = 0.4, source = source ) p. reset_index ()) p = figure ( tools = "", toolbar_location = None, x_range = ( 40, 160 )) p. DataFrame ( data = dict ( x = x, y = y )). Import numpy as np import pandas as pd from bokeh.models import Band, ColumnDataSource from otting import figure, show # Create some random data x = np.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |