Skip to content

Commit

Permalink
Better PlotMethod for Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jpivarski committed Sep 26, 2016
1 parent 2ea532a commit e134654
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions histogrammar/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,18 @@ class PlotMethod(object):
def __init__(self, container, plot):
self.container = container
self.plot = plot
if hasattr(container, "plotroot"):
try:
self.root = container.plotroot
if hasattr(container, "plotbokeh"):
except (AttributeError, KeyError):
pass
try:
self.bokeh = container.plotbokeh
if hasattr(container, "plotmatplotlib"):
except (AttributeError, KeyError):
pass
try:
self.matplotlib = container.plotmatplotlib
except (AttributeError, KeyError):
pass
def __call__(self, *args, **kwds):
return self.plot(*args, **kwds)

Expand Down

0 comments on commit e134654

Please sign in to comment.