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: Trouble setting xrange when x is a time Date: Fri, 27 Sep 2019 23:44:44 +0200 Organization: solani.org Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1569620682 11176 127.0.0.43 (27 Sep 2019 21:44:42 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Fri, 27 Sep 2019 21:44:42 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Content-Language: de-DE-1901 X-User-ID: eJwNyMkBwCAIBMCWVHaBlMMh/Zdg5jkU3VoGpYLDSTvfxflDJgq3UNF0HK6uTI8l2Jxpm8wSfyO9Ebw= Cancel-Lock: sha1:0QqUQY5cBEeHBVjxO9Tt50DljTU= In-Reply-To: Xref: csiph.com comp.graphics.apps.gnuplot:4230 Am 27.09.2019 um 15:23 schrieb stuart.kendrick.sea@gmail.com: > I would like to pull a single day out of my multi-week data file. So I'm using 'set xrange'. But I'm stumbling on the format: gnuplot fails with > C:\Temp\Plot>gnuplot wst-a-rtr.gp > "wst-a-rtr.gp" line 32: Can't plot with an empty x range! > > set xrange [ "2019-09-25" : "2019-09-26" ] Type "show xrange" after this, and you see it didnt work. "set xrange" does not understand formatted time data. Maybe it should give an error message here. E.g. print "2019-09-25" + 1 gives 2020.0 gnuplots string autopromotion is perhaps a bit too ambitious here. ;) You need to transform those strings into a unix date, check the strptime() function. Karl