コード例 #1
0
    for framedcls in [VectorFieldPlot, ContourPlot, PathPlot, PolygonPlot,
                      RasterPlot, RGBPlot, HSVPlot, QuadMeshPlot, HeatMapPlot]:
        framedcls.show_frame = True


AdjointLayoutPlot.registry[Histogram] = SideHistogramPlot
AdjointLayoutPlot.registry[Spikes] = SideSpikesPlot

point_size = np.sqrt(6) # Matches matplotlib default

# Register bokeh.palettes with Palette and Cycle
def colormap_generator(palette):
    return lambda value: palette[int(value*(len(palette)-1))]

Palette.colormaps.update({name: colormap_generator(p[max(p.keys())])
                          for name, p in all_palettes.items()})

Cycle.default_cycles.update({name: p[max(p.keys())] for name, p in all_palettes.items()
                             if max(p.keys()) < 256})

dflt_cmap = 'hot' if config.style_17 else 'fire'
options = Store.options(backend='bokeh')

# Charts
options.Curve = Options('style', color=Cycle(), line_width=2)
options.BoxWhisker = Options('style', box_fill_color='lightgray', whisker_color='black',
                             box_line_color='black', outlier_color='black')
options.Scatter = Options('style', color=Cycle(), size=point_size, cmap=dflt_cmap)
options.Points = Options('style', color=Cycle(), size=point_size, cmap=dflt_cmap)
if not config.style_17:
    options.Points = Options('plot', show_frame=True)
コード例 #2
0
AdjointLayoutPlot.registry[Spikes] = SideSpikesPlot

point_size = np.sqrt(6)  # Matches matplotlib default
Cycle.default_cycles['default_colors'] = [
    '#30a2da', '#fc4f30', '#e5ae38', '#6d904f', '#8b8b8b'
]


# Register bokeh.palettes with Palette and Cycle
def colormap_generator(palette):
    return lambda value: palette[int(value * (len(palette) - 1))]


Palette.colormaps.update({
    name: colormap_generator(p[max(p.keys())])
    for name, p in all_palettes.items()
})

Cycle.default_cycles.update({
    name: p[max(p.keys())]
    for name, p in all_palettes.items() if max(p.keys()) < 256
})

dflt_cmap = 'hot' if config.style_17 else 'fire'
options = Store.options(backend='bokeh')

# Charts
options.Curve = Options('style', color=Cycle(), line_width=2)
options.BoxWhisker = Options('style',
                             box_fill_color=Cycle(),
                             whisker_color='black',
コード例 #3
0
ファイル: __init__.py プロジェクト: ioam/holoviews
    for framedcls in [VectorFieldPlot, ContourPlot, PathPlot, PolygonPlot,
                      RasterPlot, RGBPlot, HSVPlot, QuadMeshPlot, HeatMapPlot]:
        framedcls.show_frame = True


AdjointLayoutPlot.registry[Histogram] = SideHistogramPlot
AdjointLayoutPlot.registry[Spikes] = SideSpikesPlot

point_size = np.sqrt(6) # Matches matplotlib default

# Register bokeh.palettes with Palette and Cycle
def colormap_generator(palette):
    return lambda value: palette[int(value*(len(palette)-1))]

Palette.colormaps.update({name: colormap_generator(p[max(p.keys())])
                          for name, p in all_palettes.items()})

Cycle.default_cycles.update({name: p[max(p.keys())] for name, p in all_palettes.items()
                             if max(p.keys()) < 256})

dflt_cmap = 'hot' if config.style_17 else 'fire'
options = Store.options(backend='bokeh')

# Charts
options.Curve = Options('style', color=Cycle(), line_width=2)
options.BoxWhisker = Options('style', box_fill_color=Cycle(), whisker_color='black',
                             box_line_color='black', outlier_color='black')
options.Scatter = Options('style', color=Cycle(), size=point_size, cmap=dflt_cmap)
options.Points = Options('style', color=Cycle(), size=point_size, cmap=dflt_cmap)
if not config.style_17:
    options.Points = Options('plot', show_frame=True)