User Portlet User Portlet

Discussions
I am trying to write functions for SortBy. Working example is SortBy[{1, 2, 3, 4, 5, 6, 7, 8, 9}, (# - 4)^2 &] The output is {4, 3, 5, 2, 6, 1, 7, 8, 9} However, if I try using Sin, Cos or Exp, the sorting fails. Examples are ...
I agree that the documentation of new Mathematica 10 is terrible. I have visited the online documentation and have tried finding an image of a plot using the Classic colors with the hope that I can find the correct code for solving the coloring...