From: Marc Hoeppner on 26 Nov 2009 08:43 Hi, I am currently thinking about doing a heatmap for data visualization, but I have very little experience with any type of graphical tools in ruby (like the various SVG libs etc). So I was hoping someone could point me in the right direction and save me some time trying out useless libraries ;) Doesn't have to be ruby either, but that way I could probably integrate it more easily into my analysis pipeline. Thanks, Marc -- Posted via http://www.ruby-forum.com/.
From: Michael Guterl on 26 Nov 2009 18:31 On Thu, Nov 26, 2009 at 8:43 AM, Marc Hoeppner <marc.hoeppner(a)molbio.su.se> wrote: > Hi, > > I am currently thinking about doing a heatmap for data visualization, > but I have very little experience with any type of graphical tools in > ruby (like the various SVG libs etc). > > So I was hoping someone could point me in the right direction and save > me some time trying out useless libraries ;) Doesn't have to be ruby > either, but that way I could probably integrate it more easily into my > analysis pipeline. > http://blog.revolution-computing.com/2009/11/charting-time-series-as-calendar-heat-maps-in-r.html I think there are ruby bindings for R too, so that may help. Best regards, Michael Guterl
From: Marc Hoeppner on 27 Nov 2009 07:49 Hi, thanks for the link - I suspected that R would probably have that functionality. At this point I am simply curious how to do it in ruby. I managed to write a simple program that uses RMagick to draw an intensity map. It takes the highest observed value, sets it to 100% and then draws other values in relation to that. What I don't know is how to write a method that, based on a numerical value, determines a color, i.e. from blue to red. So if for example the value '1' should be a deep blue and '100' a bright red - how would one do that? All color coding schemes allowed! RMagick can draw colors using a cmyk notation (c,m,y,k) in percent as well as rgb or the commonly found code in css files ala #00cc33 . Am interested in all suggestions ;) -- Posted via http://www.ruby-forum.com/.
From: Jano Svitok on 27 Nov 2009 12:54 On Fri, Nov 27, 2009 at 13:49, Marc Hoeppner <marc.hoeppner(a)molbio.su.se> wrote: > What I don't know is how to write a method that, based on a numerical > value, determines a color, i.e. from blue to red. > > So if for example the value '1' should be a deep blue and '100' a bright > red - how would one do that? All color coding schemes allowed! Hi, what you are looking for is "color ramp" or "color gradient", there are many sites with algorithms how to compute colors between two or more given ones (for example from blue to red). J.
From: Fleck Jean-Julien on 27 Nov 2009 16:04 Hello, > Am interested in all suggestions ;) You could be interested in Tioga which can do exactly what you are looking for. See the many examples given in the tutorial. http://www.itp.ucsb.edu/~paxton/tioga.html Cheers, -- JJ Fleck PCSI1 Lycée Kléber
|
Pages: 1 Prev: Net::SSH and STDIN / Pending jobs Next: Net::Telnet - How to send keystrokes like ESC |