Skip to content

Commit

Permalink
Ensure 3d elements are initialized with 3D projection
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Nov 28, 2018
1 parent 7da3495 commit e94a7be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion holoviews/plotting/plot.py
Expand Up @@ -13,7 +13,7 @@

from ..core import OrderedDict
from ..core import util, traversal
from ..core.element import Element
from ..core.element import Element, Element3D
from ..core.overlay import Overlay, CompositeOverlay
from ..core.layout import Empty, NdLayout, Layout
from ..core.options import Store, Compositor, SkipRendering
Expand Down Expand Up @@ -575,6 +575,9 @@ def _get_projection(cls, obj):
type is found an exception is raised.
"""
isoverlay = lambda x: isinstance(x, CompositeOverlay)
element3d = obj.traverse(lambda x: x, [Element3D])
if element3d:
return '3d'
opts = cls._traverse_options(obj, 'plot', ['projection'],
[CompositeOverlay, Element],
keyfn=isoverlay)
Expand Down

0 comments on commit e94a7be

Please sign in to comment.