File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -609,7 +609,7 @@ def __init__(
609
609
# Default to categorical camp if we detect categorical shading
610
610
if ((self .datashade or self .rasterize ) and (self .aggregator is None or 'count_cat' in str (self .aggregator )) and
611
611
((self .by and not self .subplots ) or
612
- (isinstance (self .y , list ) or (self .y is None and len (set (self .variables ) - set (self .indexes )) > 1 )))):
612
+ (( isinstance (self .y , list ) and len ( self . y ) > 1 ) or (self .y is None and len (set (self .variables ) - set (self .indexes )) > 1 )))):
613
613
self ._style_opts ['cmap' ] = self ._default_cmaps ['categorical' ]
614
614
elif symmetric :
615
615
self ._style_opts ['cmap' ] = self ._default_cmaps ['diverging' ]
Original file line number Diff line number Diff line change @@ -212,6 +212,12 @@ def test_rasterize_by(self):
212
212
assert isinstance (plot , ImageStack )
213
213
assert plot .opts ["cmap" ] == cc .palette ['glasbey_category10' ]
214
214
215
+ def test_rasterize_single_y_in_list_linear_cmap (self ):
216
+ # Regression, see https://github.com/holoviz/hvplot/issues/1210
217
+ plot = self .df .hvplot .line (y = ['y' ], rasterize = True )
218
+ opts = Store .lookup_options ('bokeh' , plot [()], 'style' ).kwargs
219
+ assert opts .get ('cmap' ) == 'kbc_r'
220
+
215
221
def test_resample_when_error_unset_operation (self ):
216
222
with pytest .raises (
217
223
ValueError ,
You can’t perform that action at this time.
0 commit comments