in reply to Generating colour codes according to value

Given that you seem to want to have one color per hash value, why do you use the number of hash keys as the number of colors to generate?
  • Comment on Re: Generating colour codes according to value

Replies are listed 'Best First'.
Re^2: Generating colour codes according to value
by Sandy_Bio_Perl (Beadle) on Aug 17, 2016 at 17:40 UTC

    I want to have one colour per unique peptide, from red to green, with red associated with the most frequently observed peptides. $uniqueBinders just lets me know how many unique peptides there are in the list, so each unique binder will be the same colour. So, all 16 HISCLTFGR peptides will be red. However, peptides EYLVSFGVW and IISCSCPTV which both only appear once are not the same colour, because Color::Spectrum continues to alter the colour codes as the values in @colours change with each element from 'hot' to 'cold'. I would like peptides of a similar frequency to be the same colour

      "I want to have one colour per unique peptide, [...] I would like peptides of a similar frequency to be the same colour"

      Isn't that contradictory?

        Yes!! I should have said I want one colour per peptide frequency, sorry

        Yes!! Sorry, I can see the error of my logic. I would in fact like one colour per peptide frequency