Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.mixmin.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ingo Thies Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Plot with boxes and rgb variable Date: Thu, 15 Nov 2012 11:43:08 +0100 Lines: 33 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net m9fp0LVUXcgm5fjxUnT/qACyVa7Z0gpkCMXw3zEEp1MRI+R72hBNY+rzNkFBt9IUt5 Cancel-Lock: sha1:K3uLe6MKvNhuCgbUpPrEAYBW7/8= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 In-Reply-To: Xref: csiph.com comp.graphics.apps.gnuplot:1492 Sorry, since a while, Thunderbird (16.0.1, Ubuntu) labels "reply to group" as "followup", and "reply" is e-mail only. Since then, I repeatedly reply as mail rather than to the group. The TB developers should really improve the intuitive handling of their GUI. On 15.11.2012 05:10, sfeam wrote: > That would work if the file contained hexadecimal numbers in standard > C format: 0xFF0000 0x00FF00 0x0000FF. > The '#' character makes it a string rather than a number. My mistake was to assume that the string format is automatically recognized by gnuplot as an RGB specifier. Is far as I could find in the manual, there is no hint that standard C format has to be used here, and this format has been replaced by the string format in terminal settings some versions ago. Meanwhile, I have modified the program that outputs the data so that it now writes RGB triples rather than hexadecimals, so it works now. > OK, so we have to convert the string to a number: > > # replace the leading '#' with '0x' and convert to integer > RGB(s) = int( "0x" . s[2:*] ) > plot 'data' using 1:2:(RGB(strcol(3))) w boxes lc rgbcolor variable Thanky, this might be useful for later. However, I am happy now with RGB integer triples :-) Best wishes, Ingo