Skip to content

Commit

Permalink
Merge pull request #57 from Carifio24/add-viewer-inits
Browse files Browse the repository at this point in the history
Add init files for histogram and scatter viewers
  • Loading branch information
Carifio24 authored Apr 10, 2024
2 parents bbbe9d4 + ea37a4f commit d9dcb10
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions glue_plotly/viewers/histogram/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .layer_artist import * # noqa
from .viewer import * # noqa
2 changes: 2 additions & 0 deletions glue_plotly/viewers/histogram/layer_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

from glue_plotly.common.histogram import traces_for_layer

__all__ = ["PlotlyHistogramLayerArtist"]

SCALE_PROPERTIES = {'y_log', 'normalize', 'cumulative'}
HISTOGRAM_PROPERTIES = SCALE_PROPERTIES | {'layer', 'x_att', 'hist_x_min',
'hist_x_max', 'hist_n_bin', 'x_log'}
Expand Down
4 changes: 3 additions & 1 deletion glue_plotly/viewers/histogram/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
from glue_plotly.viewers import PlotlyBaseView
from glue_plotly.viewers.histogram.layer_artist import PlotlyHistogramLayerArtist


from glue_jupyter.registries import viewer_registry
from glue_jupyter.common.state_widgets.layer_histogram import HistogramLayerStateWidget
from glue_jupyter.common.state_widgets.viewer_histogram import HistogramViewerStateWidget


__all__ = ["PlotlyHistogramView"]


@viewer_registry("plotly_histogram")
class PlotlyHistogramView(PlotlyBaseView):

Expand Down
2 changes: 2 additions & 0 deletions glue_plotly/viewers/scatter/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .layer_artist import * # noqa
from .viewer import * # noqa
3 changes: 3 additions & 0 deletions glue_plotly/viewers/scatter/layer_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from plotly.graph_objs import Scatter, Scatterpolar


__all__ = ["PlotlyScatterLayerArtist"]


CMAP_PROPERTIES = {"cmap_mode", "cmap_att", "cmap_vmin", "cmap_vmax", "cmap"}
MARKER_PROPERTIES = {
"size_mode",
Expand Down
3 changes: 3 additions & 0 deletions glue_plotly/viewers/scatter/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from glue_plotly.viewers import PlotlyBaseView


__all__ = ["PlotlyScatterView"]


@viewer_registry("plotly_scatter")
class PlotlyScatterView(PlotlyBaseView):

Expand Down

0 comments on commit d9dcb10

Please sign in to comment.