Re: ColorData etc.
- To: mathgroup at smc.vnet.net
- Subject: [mg82313] Re: ColorData etc.
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 17 Oct 2007 04:07:54 -0400 (EDT)
- References: <ff1pie$8t7$1@smc.vnet.net>
Hi, I'm not sure if I understand what you want but Graphics[With[{h = 0.01}, Table[{Hue[x], Tooltip[Rectangle[{x, 0}, {x + h, 1}], x]}, {x, 0, 1, h}] ], AspectRatio -> 0.125, Frame -> True, FrameTicks -> {Automatic, None} ] May help to make a legend. Regards Jens P_ter wrote: > Hello, > I am not clear how ColorData etc. works. > Now I color an interval according to its integer length. > I would like to make a legend for that. > No idea how to do that. > My format of each element of a list is: Hue[(55-53)/max], Line[{{53, 4}, {55, 4}}] > In this case max = 5 for the whole list. > It means that a horizontal line is drawn with Hue[2/5] from {53,4} to {55,4} > I would like to make a legend of the colors. There are in this case only 5 colors. Hue[1] corresponds to 5, Hue[4/5] corresponds to 4 etc. > The examples in the documentation do not help me. I am sorry to say that because there are many examples. > My general question is that I would like to place at each line the length of that line as a number, just above it. > Or by clicking on the line, getting such a number. > I am lost at this. Can anyone help here? Maybe there is no need for the explicit Hue in this case and all could be done with just a list of Lines. No idea. > But all the examples in the documentation do not fit to my problem. I apologize for my question: I am not clear how ColorData etc. works. > with friendly greetings, > P_ter >