original_docstring: 
          For the image im, calculates a histogram and puts it into the supplied
          PhotoImage, out_pim
          
docstring: For the image im, calculates a histogram and puts it into the supplied
  PhotoImage, out_pim
docstring_tokens: For the image im calculates a histogram and puts it into the supplied PhotoImage out_pim
code: def add_hist_to_photoimage(im, out_pim, back="#D0D0D0", fore="#A0A0DD"):
          """
          For the image im, calculates a histogram and puts it into the supplied
          PhotoImage, out_pim
          """
          hist_width, hist_height = out_pim.width(), out_pim.height()
          vals, bins = hist_func(im, bins=hist_width,
                                 range=limits)
          # we now create the image
          # we show 0 to vals.max() in hist_height steps
          pics = ""
          for j in range(hist_height, 0, -1):
              lim = immax(vals) * 1.2 * j / hist_height
              pics += ("{"
                       + " ".join(back if x < lim else fore for x in vals)
                       + "} ")
          out_pim.put(pics)
code_tokens: def add_hist_to_photoimage ( im , out_pim , back = "#D0D0D0" , fore = "#A0A0DD" ) : hist_width , hist_height = out_pim . width ( ) , out_pim . height ( ) vals , bins = hist_func ( im , bins = hist_width , range = limits ) pics = "" for j in range ( hist_height , 0 , - 1 ) : lim = immax ( vals ) * 1.2 * j / hist_height pics += ( "{" + " " . join ( back if x < lim else fore for x in vals ) + "} " ) out_pim . put ( pics )
short_docstring: For the image im, calculates a histogram and puts it into the supplied
  PhotoImage, out_pim
short_docstring_tokens: For the image im calculates a histogram and puts it into the supplied PhotoImage out_pim
comment: """
          For the image im, calculates a histogram and puts it into the supplied
          PhotoImage, out_pim
          """$SEP$# we now create the image$SEP$# we show 0 to vals.max() in hist_height steps