Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #4230

Re: Trouble setting xrange when x is a time

Path csiph.com!weretis.net!feeder6.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Karl Ratzsch <mail.kfr@gmx.net>
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 <qmlvsa$at8$1@solani.org> (permalink)
References <a92ba117-f516-4b7e-93e5-8054c032bc3f@googlegroups.com>
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 <a92ba117-f516-4b7e-93e5-8054c032bc3f@googlegroups.com>
Xref csiph.com comp.graphics.apps.gnuplot:4230

Show key headers only | View raw


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

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Trouble setting xrange when x is a time stuart.kendrick.sea@gmail.com - 2019-09-27 06:23 -0700
  Re: Trouble setting xrange when x is a time Karl Ratzsch <mail.kfr@gmx.net> - 2019-09-27 23:44 +0200
    Re: Trouble setting xrange when x is a time Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2019-09-28 15:23 +0200
    Re: Trouble setting xrange when x is a time stuart.kendrick.sea@gmail.com - 2019-09-30 04:19 -0700

csiph-web