Skip to content

Commit

Permalink
Final revisions to propagated options
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jan 14, 2017
1 parent f08d4e6 commit dbcc8e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions holoviews/plotting/bokeh/element.py
Expand Up @@ -1009,18 +1009,18 @@ def update_frame(self, key, ranges=None, element=None):

class OverlayPlot(GenericOverlayPlot, LegendPlot):


tabs = param.Boolean(default=False, doc="""
Whether to display overlaid plots in separate panes""")

style_opts = legend_dimensions + line_properties + text_properties

_update_handles = ['source']

_inherited_options = ['width', 'height', 'xaxis', 'yaxis', 'labelled',
_propagate_options = ['width', 'height', 'xaxis', 'yaxis', 'labelled',
'bgcolor', 'fontsize', 'invert_axes', 'show_frame',
'show_grid', 'show_legend', 'logx', 'logy', 'xticks',
'yticks', 'xrotation', 'yrotation', 'lod', 'title_format']
'show_grid', 'logx', 'logy', 'xticks',
'yticks', 'xrotation', 'yrotation', 'lod',
'border', 'invert_xaxis', 'invert_yaxis']

def _process_legend(self):
plot = self.handles['plot']
Expand Down
5 changes: 3 additions & 2 deletions holoviews/plotting/mpl/element.py
Expand Up @@ -725,11 +725,12 @@ class OverlayPlot(LegendPlot, GenericOverlayPlot):

_passed_handles = ['fig', 'axis']

_inherited_options = ['aspect', 'fig_size', 'xaxis', 'yaxis', 'zaxis',
_propagate_options = ['aspect', 'fig_size', 'xaxis', 'yaxis', 'zaxis',
'labelled', 'bgcolor', 'fontsize', 'invert_axes',
'show_frame', 'show_grid', 'logx', 'logy', 'logz',
'xticks', 'yticks', 'zticks', 'xrotation', 'yrotation'
'zrotation']
'zrotation', 'invert_xaxis', 'invert_yaxis',
'invert_zaxis']

def __init__(self, overlay, ranges=None, **params):
if 'projection' not in params:
Expand Down
6 changes: 3 additions & 3 deletions holoviews/plotting/plot.py
Expand Up @@ -547,10 +547,10 @@ class GenericElementPlot(DimensionedPlot):
# plot and a 'batched' method to draw multiple Elements at once
_plot_methods = {}

# Declares the options that are inherited from sub-elements of the
# Declares the options that are propagated from sub-elements of the
# plot, mostly useful for inheriting options from individual
# Elements on an OverlayPlot. Enabled by default in v1.7.
_inherited_options = []
_propagate_options = []
v17_option_propagation = True

def __init__(self, element, keys=None, ranges=None, dimensions=None,
Expand Down Expand Up @@ -581,7 +581,7 @@ def __init__(self, element, keys=None, ranges=None, dimensions=None,
plot_opts = self.lookup_options(plot_element, 'plot').options
if self.v17_option_propagation:
inherited = self._traverse_options(plot_element, 'plot',
self._inherited_options,
self._propagate_options,
defaults=False)
plot_opts.update(**{k: v[0] for k, v in inherited.items()})

Expand Down

0 comments on commit dbcc8e3

Please sign in to comment.