From mboxrd@z Thu Jan 1 00:00:00 1970 From: Foivos S. Zakkak Subject: [org-plot/gnuplot] Plotting candlestick plots Date: Thu, 17 Sep 2015 20:05:16 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcccg-0005Qt-Oz for emacs-orgmode@gnu.org; Thu, 17 Sep 2015 13:05:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zcccb-0005rZ-23 for emacs-orgmode@gnu.org; Thu, 17 Sep 2015 13:05:26 -0400 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:32975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zccca-0005q8-Rm for emacs-orgmode@gnu.org; Thu, 17 Sep 2015 13:05:21 -0400 Received: by wiclk2 with SMTP id lk2so32741360wic.0 for ; Thu, 17 Sep 2015 10:05:19 -0700 (PDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hello list, I am trying to plot some candlesticks through org-plot/gnuplot, but I fail. It seems that org-plot/gnuplot supports a list of numbers in deps, i.e., deps:(2 3 4) and then creates a string of the form: 'test.dat' using X with lines where X is first 2 then 3 and finally 4 for deps:(2 3 4) To plot candlesticks though, gnuplot expects a line of the form: 'test'.dat' using 1:3:2:6:5:xticlabels(7) with candlesticks whiskerbars I thought that maybe setting deps to ("1:3:2:6:5") could give me the result I wanted, but I was wrong. I have traced the problem to be in org-plot/gnuplot-script, specifically in the following code segment: --8<---------------cut here---------------start------------->8--- (2d (dotimes (col num-cols) (unless (and (eq type '2d) (or (and ind (equal (1+ col) ind)) (and deps (not (member (1+ col) deps))))) (setf plot-lines (cons (format plot-str data-file (or (and ind (> ind 0) (not text-ind) (format "%d:" ind)) "") (1+ col) (if text-ind (format ":xticlabel(%d)" ind) "") with (or (nth col col-labels) (format "%d" (1+ col)))) plot-lines))))) --8<---------------cut here---------------end--------------->8--- This code-segment essentially goes through the columns in the data file and checks for each of them if it is contained in `deps`, if so it proceeds with creating a line of the form: 'test.dat' using X... I believe an easy fix would be to unconditionally go through deps and create a line of the form: 'test.dat' using X... where X is the corresponding element of deps. I tried to hack it, but didn't have much success, any help is welcome. Kind regards, Foivos -- WWW: foivos.zakkak.net PGP: 7B40 69D9 29BA AE91 C0B3 220A 0846 BFD1 03F0 4EA1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREKAAYFAlX68swACgkQEtEYTzCDyrY6MwEAiQ3bI5xV+cjFLQmrgVtGOzqT 24m+SA+sgUpvnFwx8zYA/Rv45PKs/hWveUQKVQ0qHaeWsB1Hfk8pTA2BmrimBDt6 =/3sU -----END PGP SIGNATURE----- --=-=-=--