Skip to content

Commit

Permalink
Ensure 3d elements are initialized with 3D projection (#3218)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Nov 29, 2018
1 parent 943f186 commit bea0f54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion holoviews/plotting/plot.py
Original file line number Diff line number Diff line change
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 bea0f54

Please sign in to comment.