/
__init__.py
63 lines (51 loc) · 1.96 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from ...core.options import Store, Cycle, Options
from ...core import (Overlay, NdOverlay, Layout, NdLayout, GridSpace,
GridMatrix)
from ...interface.seaborn import *
from ...element import *
from .renderer import PlotlyRenderer
from .element import *
from .chart import *
from .chart3d import *
from .raster import *
from .plot import *
from .tabular import *
Store.renderers['plotly'] = PlotlyRenderer.instance()
if len(Store.renderers) == 1:
Store.current_backend = 'plotly'
Store.register({Points: PointPlot,
Scatter: PointPlot,
Curve: CurvePlot,
ErrorBars: ErrorBarsPlot,
Bivariate: BivariatePlot,
Distribution: DistributionPlot,
Bars: BarPlot,
BoxWhisker: BoxWhiskerPlot,
# Raster plots
Raster: RasterPlot,
Image: RasterPlot,
HeatMap: HeatMapPlot,
# 3D Plot
Scatter3D: Scatter3dPlot,
Surface: SurfacePlot,
Trisurface: TrisurfacePlot,
# Tabular
Table: TablePlot,
ItemTable: TablePlot,
# Container Plots
Overlay: OverlayPlot,
NdOverlay: OverlayPlot,
Layout: LayoutPlot,
NdLayout: LayoutPlot,
GridSpace: GridPlot,
GridMatrix: GridPlot}, backend='plotly')
options = Store.options(backend='plotly')
point_size = np.sqrt(6) # Matches matplotlib default
Cycle.default_cycles['default_colors'] = ['#30a2da', '#fc4f30', '#e5ae38',
'#6d904f', '#8b8b8b']
# Charts
options.Curve = Options('style', color=Cycle(), width=2)
options.ErrorBars = Options('style', color='black')
options.Scatter = Options('style', color=Cycle())
options.Points = Options('style', color=Cycle())
options.Trisurface = Options('style', cmap='viridis')