Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Karl Ratzsch Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Lost minutes Date: Thu, 19 Jan 2017 20:53:10 +0100 Organization: solani.org Lines: 54 Message-ID: References: <566df517-180f-4457-8a64-a899cf76e57f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: solani.org 1484855594 26693 eJwNysEBwCAIA8CVEJMUx1Go+48gv3scp4bygyjw8jZ3uRe4gsraszDMfAFpql5/Wp5hPTxOPBIuEJE= (19 Jan 2017 19:53:14 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 19 Jan 2017 19:53:14 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 In-Reply-To: <566df517-180f-4457-8a64-a899cf76e57f@googlegroups.com> Cancel-Lock: sha1:h2wTiyUDhRqgaJiYxSE+LDbvIhk= X-NNTP-Posting-Host: eJwFwYEBgDAIA7CXwEGL58ig/59gkgeOy0AiUimbPj6985GzzgdVfAcsl2UKwtLaWmFE3x8kfBE+ X-User-ID: eJwFwQEBwDAIAzBLQKHDzmGrfwlPCnTuSRazVAJad9PDRtbIkT+8Ao7Px9mnDtGiEt7s+wMZwRDJ Xref: csiph.com comp.graphics.apps.gnuplot:3541 Am 19.01.2017 um 14:12 schrieb vittec@gmail.com: > Ok i have a .csv file with time and temperature. The values are like this: > 18:25:46 , 25.4 > The problem is that the graph's points are not distributed as they should. I mean if i have 10 values in the 18 p.m. > gnuplot does not put them in the intermediate places. It plots all the values in the 18:00:00 column. Just as it takes only the hour parameter. > set xdata time → It gives me a lot of problems saying that the requires more spec. > set timefmt "%H:%M:%S" → makes the same only in the integer hours Hint: Please give a complete script that one can c&p into gnuplot, including some (a few lines of) data. Saves others a lot of time: (I assume you have gnuplot >5.0 ? Otherwise the inline data $dat doesn't work, the rest should.) ========= $dat << EOD 18:01:45 , 25 18:06:58 , 25.1 18:11:42 , 25.2 18:16:46 , 25.1 EOD set dataf sep "," set format x "%H:%M:%S" time # that's the _output_ format plot $dat us (timecolumn(1,"%H:%M:%S")):2 # that's the _input_ format ========= You can also set the input format via set timefmt "%H:%M:%S" , then you can leave the format string out of the plot command: plot $dat us (timecolumn(1)):2 "set xdata time" automatically sets the x output format to the one set by "set timefmt", unless you have defined it otherwise via "set format x". With "xdata time" set, you can finally simply write plot $dat 1:2 . (Or so I thought. Doesn't work now. Hm.) Hope that helps. Karl