Skip to content

Commit

Permalink
Moved the opts helper function to plotting/__init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens committed Feb 25, 2015
1 parent afb67d7 commit 81a3c8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 1 addition & 5 deletions holoviews/ipython/display_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
NdOverlay, GridSpace, Layout, Overlay
from ..core.traversal import unique_dimkeys, bijective
from ..element import Raster
from ..plotting import LayoutPlot, GridPlot, RasterGridPlot, Plot, ANIMATION_OPTS
from ..plotting import LayoutPlot, GridPlot, RasterGridPlot, Plot, ANIMATION_OPTS, opts
from .magics import ViewMagic, OptsMagic
from .widgets import IPySelectionWidget, SelectionWidget, ScrubberWidget

Expand All @@ -41,10 +41,6 @@
# Helper functions #
#==================#

def opts(el, size):
"Returns the plot options with supplied size (if not overridden)"
return dict(figure_size=size, **Store.lookup_options(el, 'plot').options)


def get_plot_size(size):
factor = size / 100.0
Expand Down
3 changes: 3 additions & 0 deletions holoviews/plotting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from . import seaborn # pyflakes:ignore (API import)


def opts(el, size):
"Returns the plot options with supplied size (if not overridden)"
return dict(figure_size=size, **Store.lookup_options(el, 'plot').options)
GIF_TAG = "<center><img src='data:image/gif;base64,{b64}' style='max-width:100%'/><center/>"
VIDEO_TAG = """
<center><video controls style='max-width:100%'>
Expand Down

0 comments on commit 81a3c8b

Please sign in to comment.