Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Karl Ratzsch Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Hex 2 dec conversion Date: Thu, 12 Dec 2019 22:10:49 +0100 Organization: solani.org Lines: 27 Message-ID: References: <97645b00-a063-4b6e-a994-90622b875eca@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: solani.org 1576185048 18527 127.0.0.43 (12 Dec 2019 21:10:48 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 12 Dec 2019 21:10:48 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 Content-Language: de-DE-1901 X-User-ID: eJwFwYkBwCAIA8CVpBiecUjU/UfoHTwslDsQGw9v7lAuay5elFjN9HOPjuGrnpC8JnonSFs/QjIR7Q== In-Reply-To: Cancel-Lock: sha1:zIB+9/G0r+BjVZ9BYfXaoQKmt5c= Xref: csiph.com comp.graphics.apps.gnuplot:4276 Am 11.12.2019 um 23:40 schrieb Hans-Bernhard Bröker: > Am 11.12.2019 um 19:43 schrieb Robert Vanpass: >> I have a .csv datafile with only 2-digit numbers in Hexadecimal form: >> Is there a function in Gnuplot to convert these Hex numbers to Decimal form, > No. Actually yes. Gnuplot understands hexadecimal (and octal), the number just needs a preceeding "0x" (or "0") marker. You just have to add it in your "using" statement, and then take advantage of gnuplot´s automatic type promotion: $dat << EOD 11c 4 12a 5 133 4 13f 6 1aa 1 EOD pl $dat us (("0x".strcol(1))*1):2 w l Admittedly, I was very doubtful too before seeing the above example actually producing a plot. ;)