Skip to content

Commit

Permalink
Merge pull request #631 from ioam/overlay_labels
Browse files Browse the repository at this point in the history
Fixed bug in determining axis labels
  • Loading branch information
jlstevens committed Apr 20, 2016
2 parents 941acd2 + 2181d3a commit 1b45e46
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions holoviews/plotting/mpl/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _finalize_axis(self, key, title=None, dimensions=None, ranges=None, xticks=N
"""
element = self._get_frame(key)
self.current_frame = element
if not dimensions and element:
if not dimensions and element and not self.subplots:
el = element.traverse(lambda x: x, [Element])
if el: dimensions = el[0].dimensions()
axis = self.handles['axis']
Expand All @@ -158,7 +158,8 @@ def _finalize_axis(self, key, title=None, dimensions=None, ranges=None, xticks=N
# Apply axis options if axes are enabled
if element and not any(not sp._has_axes for sp in [self] + subplots):
# Set axis labels
self._set_labels(axis, dimensions, xlabel, ylabel, zlabel)
if dimensions:
self._set_labels(axis, dimensions, xlabel, ylabel, zlabel)

# Set axes limits
self._set_axis_limits(axis, element, subplots, ranges)
Expand Down Expand Up @@ -205,7 +206,7 @@ def _finalize_ticks(self, axis, dimensions, xticks, yticks, zticks):
and Elements. Sets the axes position as well as tick positions,
labels and fontsize.
"""
ndims = len(dimensions)
ndims = len(dimensions) if dimensions else 0
xdim = dimensions[0] if ndims else None
ydim = dimensions[1] if ndims > 1 else None

Expand Down

0 comments on commit 1b45e46

Please sign in to comment.