Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set SpikesPlot color index to None by default #1671

Merged
merged 5 commits into from
Jul 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion holoviews/plotting/bokeh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def colormap_generator(palette):
options.Spread = Options('style', color=Cycle(), alpha=0.6, line_color='black')
options.Bars = Options('style', color=Cycle(), line_color='black', width=0.8)

options.Spikes = Options('style', color='black')
options.Spikes = Options('style', color='black', cmap='fire')
options.Area = Options('style', color=Cycle(), line_color='black')
options.VectorField = Options('style', color='black')

Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/bokeh/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def get_data(self, element, ranges=None, empty=False):

class SpikesPlot(PathPlot, ColorbarPlot):

color_index = param.ClassSelector(default=1, allow_None=True,
color_index = param.ClassSelector(default=None, allow_None=True,
class_=(basestring, int), doc="""
Index of the dimension from which the color will the drawn""")

Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/mpl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def grid_selector(grid):
options.Scatter3D = Options('style', c=Cycle(), marker='o')
options.Scatter3D = Options('plot', fig_size=150)
options.Surface = Options('plot', fig_size=150)
options.Spikes = Options('style', color='black')
options.Spikes = Options('style', color='black', cmap='fire')
options.Area = Options('style', facecolor=Cycle(), edgecolor='black')
options.BoxWhisker = Options('style', boxprops=dict(color='k', linewidth=1.5),
whiskerprops=dict(color='k', linewidth=1.5))
Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/mpl/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ class SpikesPlot(PathPlot, ColorbarPlot):
explicit aspect ratio as width/height as well as
'square' and 'equal' options.""")

color_index = param.ClassSelector(default=1, allow_None=True,
color_index = param.ClassSelector(default=None, allow_None=True,
class_=(basestring, int), doc="""
Index of the dimension from which the color will the drawn""")

Expand Down
3 changes: 2 additions & 1 deletion tests/testplotinstantiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,8 @@ def test_quadmesh_colormapping(self):

def test_spikes_colormapping(self):
spikes = Spikes(np.random.rand(20, 2), vdims=['Intensity'])
self._test_colormapping(spikes, 1)
color_spikes = spikes.opts(plot=dict(color_index=1))
self._test_colormapping(color_spikes, 1)

def test_empty_spikes_plot(self):
spikes = Spikes([], vdims=['Intensity'])
Expand Down