def start_plot(self): """Add the axis, grids and tools """ self.create_axes() self.create_grids(self._xgrid, self._ygrid) if self.toolbar.tools: self.create_tools(self._tools, self._active_drag, self._active_inspect, self._active_scroll, self._active_tap) if len(self._tooltips) > 0: self.add_tools(HoverTool(tooltips=self._tooltips)) if isinstance(self.x_range, FactorRange): self.x_scale = CategoricalScale() if isinstance(self.y_range, FactorRange): self.y_scale = CategoricalScale()
def test__check_compatible_scale_and_ranges_incompat_factor_scale_and_numeric_range( ): plot = Plot(x_scale=CategoricalScale(), x_range=DataRange1d()) check = plot._check_compatible_scale_and_ranges() assert check != []
def test__check_compatible_scale_and_ranges_compat_factor(): plot = Plot(x_scale=CategoricalScale(), x_range=FactorRange()) check = plot._check_compatible_scale_and_ranges() assert check == []