emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [org-plot/gnuplot] Plotting candlestick plots


From: Foivos S . Zakkak
Subject: [O] [org-plot/gnuplot] Plotting candlestick plots
Date: Thu, 17 Sep 2015 20:05:16 +0300

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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]