From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Trying to get chart from table working Date: Sat, 30 Sep 2017 14:25:28 +0100 Message-ID: <871smoxqrb.fsf@gmail.com> References: <951a16f3-142b-9a46-d205-e75e93b46fe9@pfdstudio.com> <87efqp8sob.fsf@pinto.chemeng.ucl.ac.uk> <1506699746.1209685.1122625320.2C7619C2@webmail.messagingengine.com> <1506699975.1210299.1122633688.70058F8C@webmail.messagingengine.com> <1506720729.1291151.1122958984.5896B03B@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyHlv-0002AE-Lp for emacs-orgmode@gnu.org; Sat, 30 Sep 2017 09:25:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyHls-00064T-Sb for emacs-orgmode@gnu.org; Sat, 30 Sep 2017 09:25:35 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:37404) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dyHls-00061m-HP for emacs-orgmode@gnu.org; Sat, 30 Sep 2017 09:25:32 -0400 Received: by mail-wr0-x243.google.com with SMTP id u48so1097231wrf.4 for ; Sat, 30 Sep 2017 06:25:31 -0700 (PDT) In-Reply-To: <1506720729.1291151.1122958984.5896B03B@webmail.messagingengine.com> (Peter Davis's message of "Fri, 29 Sep 2017 17:32:09 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Peter Davis Cc: emacs-orgmode@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain On Friday, 29 Sep 2017 at 17:32, Peter Davis wrote: > I'm sorry to belabor this, but I could use some help. I'd be willing to > pay a modest consulting fee, but I'm trying to solve a problem in a > timely way, as it would help me with healthcare decisions. > > Basically, I want to plot a time series graph showing my PSA (prostate > specific antigen) over time. The PSA is measured at irregular intervals, > and has been for over 4 years (and hopefully will continue for many more > years.) That should be a simple enough graph. I've already got a > javascript d3 example that does this, but I'd like to embed it in a > document, and to be able to generate PDF. This part is relatively straightforward. Using your data example, you can do the following: --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=t.org * table #+name: measurements | Date | PSA | | |------------+-----+---------| | 2017-08-11 | 185 | | | 2017-08-21 | | #ffdd99 | | 2017-09-19 | 854 | #ffdd99 | #+begin_src gnuplot :var data=measurements :file timeseries.pdf :results file set xdata time set timefmt "%Y-%m-%d" set xrange ["2017-08-01":"2017-10-01"] unset key plot data using 1:2 with histeps #+end_src #+results: [[file:timeseries.pdf]] --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable The colouring bit is harder and I don't know whether it's possible or not. I suggest you look at examples on the web, e.g. http://gnuplot.sourceforge.net/demo/ to see if anything fits what you are trying to do. HTH, eric =2D-=20 : Eric S Fraga via Emacs 27.0.50, Org release_9.1.1-78-gfbf47c --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWc+bSAAKCRDIkZPY//z2 fYyiAJsF77CjWIvtdQOp39dejbfcOI0FAgCeP3GVqUUa7ByYxFX1iWc2MJVVXdY= =OapS -----END PGP SIGNATURE----- --==-=-=--