def make_median(q2):
 return graph_objs.Scatter(x=[0], y=[q2], text=[('median: ' + '{:0.2f}'.format(q2))], mode='markers', marker=dict(symbol='square', color='rgb(255,255,255)'), hoverinfo='text')

def make_median ( q2 ) : return graph_objs . Scatter ( x = [ 0 ] , y = [ q2 ] , text = [ ( 'median: ' + '{:0.2f}' . format ( q2 ) ) ] , mode = 'markers' , marker = dict ( symbol = 'square' , color = 'rgb(255,255,255)' ) , hoverinfo = 'text' )
formats the median hovertext for a violin plot .