Skip to content

Commit

Permalink
Get rid of WebGL related stuffs
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Jul 20, 2021
1 parent f1a8b95 commit 607abb2
Show file tree
Hide file tree
Showing 16 changed files with 93 additions and 3,372 deletions.
5 changes: 0 additions & 5 deletions bqplot/marks.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,11 +730,6 @@ def default_opacities(self, value):
_model_name = Unicode('ScatterModel').tag(sync=True)


@register_mark('bqplot.ScatterGL')
class ScatterGL(Scatter):
_view_name = Unicode('ScatterGL').tag(sync=True)
_model_name = Unicode('ScatterGLModel').tag(sync=True)


@register_mark('bqplot.Label')
class Label(_ScatterBase):
Expand Down
15 changes: 3 additions & 12 deletions bqplot/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
from .figure import Figure
from .scales import Scale, LinearScale, Mercator
from .axes import Axis
from .marks import (Lines, Scatter, ScatterGL, Hist, Bars, OHLC, Pie, Map, Image,
from .marks import (Lines, Scatter, Hist, Bars, OHLC, Pie, Map, Image,
Label, HeatMap, GridHeatMap, topo_load, Boxplot, Bins)
from .toolbar import Toolbar
from .interacts import (BrushIntervalSelector, FastIntervalSelector,
Expand All @@ -65,8 +65,6 @@
from traitlets.utils.sentinel import Sentinel
import functools

SCATTER_SIZE_LIMIT = 10 * 1000 # above this limit, ScatterGL will be used by default

Keep = Sentinel('Keep', 'bqplot.pyplot', '''
Used in bqplot.pyplot to specify that the same scale should be used for
a certain dimension.
Expand Down Expand Up @@ -816,7 +814,7 @@ def ohlc(*args, **kwargs):


@_process_data('color', 'opacity', 'size', 'skew', 'rotation')
def scatter(x, y, use_gl=None, **kwargs):
def scatter(x, y, **kwargs):
"""Draw a scatter in the current context figure.
Parameters
Expand All @@ -826,9 +824,6 @@ def scatter(x, y, use_gl=None, **kwargs):
The x-coordinates of the data points.
y: numpy.ndarray, 1d
The y-coordinates of the data points.
use_gl: If true, will use the ScatterGL mark (pixelized but faster), if false a normal
Scatter mark is used. If None, a choised is made automatically depending on the length
of x.
options: dict (default: {})
Options for the scales to be created. If a scale labeled 'x' is
required for that mark, options['x'] contains optional keyword
Expand All @@ -840,11 +835,7 @@ def scatter(x, y, use_gl=None, **kwargs):
"""
kwargs['x'] = x
kwargs['y'] = y
if use_gl is None:
mark_class = ScatterGL if len(x) >= SCATTER_SIZE_LIMIT else Scatter
else:
mark_class = ScatterGL if use_gl else Scatter
return _draw_mark(mark_class, **kwargs)
return _draw_mark(Scatter, **kwargs)


@_process_data()
Expand Down

0 comments on commit 607abb2

Please sign in to comment.