@@ -2932,8 +2932,8 @@ class _Dendrogram(FigureFactory):
2932
2932
py.iplot( fig, filename='Dendro', validate=False )'''
2933
2933
2934
2934
def __init__ (self , X , orientation = 'bottom' , labels = None , colorscale = None , \
2935
- width = 700 , height = 700 , xaxis = 'xaxis' , yaxis = 'yaxis' ):
2936
- ''' Draw a 2d dendrogram tree
2935
+ width = "100%" , height = "100%" , xaxis = 'xaxis' , yaxis = 'yaxis' ):
2936
+ ''' Draw a 2d dendrogram tree
2937
2937
X: Heatmap matrix as array of arrays
2938
2938
orientation: 'top', 'right', 'bottom', or 'left'
2939
2939
labels: List of axis category labels
@@ -3009,7 +3009,7 @@ def set_axis_layout(self, axis_key):
3009
3009
3010
3010
axis_defaults = {
3011
3011
'type' : 'linear' ,
3012
- 'ticks' : 'inside ' ,
3012
+ 'ticks' : 'outside ' ,
3013
3013
'mirror' : 'allticks' ,
3014
3014
'rangemode' : 'tozero' ,
3015
3015
'showticklabels' : True ,
@@ -3018,29 +3018,29 @@ def set_axis_layout(self, axis_key):
3018
3018
'showline' : True ,
3019
3019
}
3020
3020
3021
- if self .labels != None :
3021
+ if len ( self .labels ) != 0 :
3022
3022
axis_key_labels = self .xaxis
3023
- if self .orientation in ['left' ,'right' ]:
3023
+ if self .orientation in ['left' , 'right' ]:
3024
3024
axis_key_labels = self .yaxis
3025
3025
if axis_key_labels not in self .layout :
3026
3026
self .layout [axis_key_labels ] = {}
3027
3027
self .layout [axis_key_labels ]['tickvals' ] = [ea * self .sign [axis_key ] for ea in self .zero_vals ]
3028
3028
self .layout [axis_key_labels ]['ticktext' ] = self .labels
3029
3029
self .layout [axis_key_labels ]['tickmode' ] = 'array'
3030
3030
3031
- self .layout [axis_key ].update ( axis_defaults )
3031
+ self .layout [axis_key ].update (axis_defaults )
3032
3032
3033
3033
return self .layout [axis_key ]
3034
3034
3035
- def set_figure_layout ( self , width , height ):
3035
+ def set_figure_layout (self , width , height ):
3036
3036
''' Sets and returns default layout object for dendrogram figure '''
3037
3037
3038
3038
self .layout .update ({
3039
- 'showlegend' :False ,
3040
- 'autoscale' :False ,
3041
- 'hovermode' :'closest' ,
3042
- 'width' :width ,
3043
- 'width' :height
3039
+ 'showlegend' : False ,
3040
+ 'autoscale' : False ,
3041
+ 'hovermode' : 'closest' ,
3042
+ 'width' : width ,
3043
+ 'width' : height
3044
3044
})
3045
3045
3046
3046
self .set_axis_layout (self .xaxis )
0 commit comments