@@ -399,8 +399,8 @@ def get_end_code(self, data):
399399 elif self .is_subplot and self .nsubplots == self .subplot_index :
400400 data ['is_in_groupplot_env' ] = False
401401 return '\\ end{groupplot}\n \n '
402- else :
403- return ''
402+
403+ return ''
404404
405405
406406def _get_label_rotation_and_horizontal_alignment (
@@ -421,7 +421,7 @@ def _get_label_rotation_and_horizontal_alignment(
421421 obj .xaxis .get_majorticklabels () if axes_obj == 'x' \
422422 else obj .yaxis .get_majorticklabels ()
423423
424- if len ( major_tick_labels ) == 0 :
424+ if not major_tick_labels :
425425 return None
426426
427427 tick_labels_rotation = \
@@ -448,7 +448,7 @@ def _get_label_rotation_and_horizontal_alignment(
448448 'label text width\' has been passed in the \' extra\' '
449449 'parameter' % axes_obj )
450450
451- if len ( values ) > 0 :
451+ if values :
452452 label_style = \
453453 '%sticklabel style = {%s}' % (axes_obj , ',' .join (values ))
454454 else :
@@ -733,16 +733,16 @@ def _handle_listed_color_map(cmap):
733733 if cmap .N is None or cmap .N == len (cmap .colors ):
734734 colors = [
735735 'rgb(%d%s)=(%.15g,%.15g,%.15g)'
736- % (k , unit , color [0 ], color [1 ], color [2 ])
737- for (k , color ) in enumerate (cmap .colors )
736+ % (k , unit , rgb [0 ], rgb [1 ], rgb [2 ])
737+ for (k , rgb ) in enumerate (cmap .colors )
738738 ]
739739 else :
740740 reps = int (float (cmap .N ) / len (cmap .colors ) - 0.5 ) + 1
741741 repeated_cols = reps * cmap .colors
742742 colors = [
743743 'rgb(%d%s)=(%.15g,%.15g,%.15g)'
744- % (k , unit , color [0 ], color [1 ], color [2 ])
745- for (k , color ) in enumerate (repeated_cols [:cmap .N ])
744+ % (k , unit , rgb [0 ], rgb [1 ], rgb [2 ])
745+ for (k , rgb ) in enumerate (repeated_cols [:cmap .N ])
746746 ]
747747
748748 colormap_string = '{mymap}{[1%s]\n %s\n }' % \
0 commit comments