Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 4 additions & 21 deletions bqplot/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

r"""

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were for Sphinx that we don't use anymore


====
Axes
====

.. currentmodule:: bqplot.axes

.. autosummary::
:toctree: _generate/

Axis
ColorAxis
"""

from traitlets import Int, Unicode, Instance, Enum, Dict, Bool
from traittypes import Array
from ipywidgets import Widget, Color, widget_serialization
Expand All @@ -36,13 +21,11 @@
from ._version import __frontend_version__


# Returns a decorator registering an axis class in the axis type registry.
# If no key is provided, the class name is used as a key. A key is provided
# for each core bqplot axis so that the frontend can use this key regardless
# of the kernel language.
def register_axis(key=None):
"""Returns a decorator registering an axis class in the axis type registry.

If no key is provided, the class name is used as a key. A key is provided
for each core bqplot axis so that the frontend can use this key regardless
of the kernel language.
"""
def wrap(axis):
name = key if key is not None else axis.__module__ + axis.__name__
BaseAxis.axis_types[name] = axis
Expand Down
34 changes: 4 additions & 30 deletions bqplot/interacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

r"""

=========
Interacts
=========

.. currentmodule:: bqplot.interacts

.. autosummary::
:toctree: _generate/

BrushIntervalSelector
BrushSelector
HandDraw
IndexSelector
FastIntervalSelector
MultiSelector
OneDSelector
Interaction
PanZoom
Selector
TwoDSelector
"""

from traitlets import (Bool, Int, Float, Unicode, Dict,
Instance, List, Enum, observe)
from traittypes import Array
Expand All @@ -48,13 +24,11 @@
import numpy as np


# Decorator registering an interaction class in the registry.
# If no key is provided, the class name is used as a key. A key is provided
# for each core bqplot interaction type so that the frontend can use this
# key regardless of the kernel language.
def register_interaction(key=None):
"""Decorator registering an interaction class in the registry.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of functions are not to be used by the end user, so we don't document them with docstrings


If no key is provided, the class name is used as a key. A key is provided
for each core bqplot interaction type so that the frontend can use this
key regardless of the kernel language.
"""
def wrap(interaction):
name = key if key is not None else interaction.__module__ + \
interaction.__name__
Expand Down
14 changes: 0 additions & 14 deletions bqplot/market_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

r"""

==========
Market Map
==========

.. currentmodule:: bqplot.market_map

.. autosummary::
:toctree: _generate/

MarketMap
"""

from traitlets import Int, Unicode, List, Dict, Bool, Instance, Float
from traittypes import Array, DataFrame
from ipywidgets import (DOMWidget, CallbackDispatcher, Color,
Expand Down
43 changes: 5 additions & 38 deletions bqplot/marks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

r"""

=====
Marks
=====

.. currentmodule:: bqplot.marks

.. autosummary::
:toctree: _generate/

Mark
Lines
FlexLine
Scatter
Hist
Bars
Graph
GridHeatMap
HeatMap
Label
OHLC
Pie
Map
"""
import os
import json

Expand All @@ -58,13 +33,11 @@
from .colorschemes import CATEGORY10


# Returns a decorator registering a mark class in the mark type registry.
# If no key is provided, the class name is used as a key. A key is provided
# for each core bqplot mark so that the frontend can use
# this key regardless of the kernel language.
def register_mark(key=None):
"""Returns a decorator registering a mark class in the mark type registry.

If no key is provided, the class name is used as a key. A key is provided
for each core bqplot mark so that the frontend can use
this key regardless of the kernel language.
"""
def wrap(mark):
name = key if key is not None else mark.__module__ + mark.__name__
Mark.mark_types[name] = mark
Expand Down Expand Up @@ -1253,10 +1226,6 @@ class Bins(Bars):
.tag(sync=True, display_name='Number of bins')

def __init__(self, **kwargs):
'''
Sets listeners on the data and the binning parameters.
Adjusts `Bars` defaults to suit a histogram better.
'''
self.observe(self.bin_data,
names=['sample', 'bins', 'density', 'min', 'max'])
# One unique color by default
Expand All @@ -1267,9 +1236,7 @@ def __init__(self, **kwargs):
super(Bins, self).__init__(**kwargs)

def bin_data(self, *args):
'''
Performs the binning of `sample` data, and draws the corresponding bars
'''
# Performs the binning of `sample` data, and draws the corresponding bars
# Get range
_min = self.sample.min() if self.min is None else self.min
_max = self.sample.max() if self.max is None else self.max
Expand Down
37 changes: 1 addition & 36 deletions bqplot/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

r"""

======
Pyplot
======

.. currentmodule:: bqplot.pyplot

.. autosummary::
:toctree: _generate/

figure
show
axes

plot
scatter
hist
bar
ohlc
geo

clear
close
current_figure

scales
xlim
ylim

axes
xlabel
ylabel

"""
import sys
from collections import OrderedDict
from IPython.display import display
Expand Down Expand Up @@ -106,8 +71,8 @@
string_types = str,


# Determine whether `v` can be hashed.
def hashable(data, v):
"""Determine whether `v` can be hashed."""
try:
data[v]
except (TypeError, KeyError, IndexError):
Expand Down
5 changes: 1 addition & 4 deletions docs/api/axes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

::: bqplot.Axis
handler: python

::: bqplot.ColorAxis
::: bqplot.axes
handler: python
32 changes: 1 addition & 31 deletions docs/api/interactions.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@

::: bqplot.interacts.BrushIntervalSelector
handler: python

::: bqplot.interacts.BrushSelector
handler: python

::: bqplot.interacts.HandDraw
handler: python

::: bqplot.interacts.IndexSelector
handler: python

::: bqplot.interacts.FastIntervalSelector
handler: python

::: bqplot.interacts.MultiSelector
handler: python

::: bqplot.interacts.OneDSelector
handler: python

::: bqplot.interacts.Interaction
handler: python

::: bqplot.interacts.PanZoom
handler: python

::: bqplot.interacts.Selector
handler: python

::: bqplot.interacts.TwoDSelector
::: bqplot.interacts
handler: python
38 changes: 1 addition & 37 deletions docs/api/marks.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,2 @@
::: bqplot.Mark
handler: python

::: bqplot.Lines
handler: python

::: bqplot.FlexLine
handler: python

::: bqplot.Scatter
handler: python

::: bqplot.Hist
handler: python

::: bqplot.Bars
handler: python

::: bqplot.Graph
handler: python

::: bqplot.GridHeatMap
handler: python

::: bqplot.HeatMap
handler: python

::: bqplot.Label
handler: python

::: bqplot.OHLC
handler: python

::: bqplot.Pie
handler: python

::: bqplot.Map
::: bqplot.marks
handler: python
53 changes: 1 addition & 52 deletions docs/api/pyplot.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,2 @@
::: bqplot.pyplot.figure
handler: python

::: bqplot.pyplot.show
handler: python

::: bqplot.pyplot.axes
handler: python

::: bqplot.pyplot.plot
handler: python

::: bqplot.pyplot.scatter
handler: python

::: bqplot.pyplot.hist
handler: python

::: bqplot.pyplot.bar
handler: python

::: bqplot.pyplot.ohlc
handler: python

::: bqplot.pyplot.geo
handler: python

::: bqplot.pyplot.clear
handler: python

::: bqplot.pyplot.close
handler: python

::: bqplot.pyplot.current_figure
handler: python

::: bqplot.pyplot.scales
handler: python

::: bqplot.pyplot.xlim
handler: python

::: bqplot.pyplot.ylim
handler: python

::: bqplot.pyplot.axes
handler: python

::: bqplot.pyplot.xlabel
handler: python

::: bqplot.pyplot.ylabel
::: bqplot.pyplot
handler: python