William Henney writes:
The following table works correctly with org-plot
#+PLOT: title:"org-plot test" ind:1 type:2d with:hist set:"style fill
solid" set:"yrange [0:]"
| Year | a | b |
|-------+---+---|
| x2006 | 3 | 1 |
| 2007 | 1 | 2 |
| 2008 | 2 | 0 |
However, if the "x" is removed from the start of all the years, it no
longer works:
#+PLOT: title:"org-plot bug" ind:1 type:2d with:hist set:"style fill
solid" set:"yrange [0:]"
| Year | a | b |
|------+---+---|
| 2006 | 3 | 1 |
| 2007 | 1 | 2 |
| 2008 | 2 | 0 |
From glancing through org-plot.el, it seems as though the problem is
that the text-ind parameter is false when all the values in the
"independent variable" column are legal numbers. However, my lisp
skills are not up to fixing this.
This patch is by Charles Sebold and Eric Schulte fixes the problem.
On 28 Oct 2008, Eric Schulte wrote:
> Hi Charles, The patch looks great, I vote we drop it 'as is' into
> org-plot.el. The only enhancement that comes to mind would be to
> expose the `time-ind' variable as a plot option. Allowing users to
> specify different time formats, but really if they're that
> sophisticated in their use of gnuplot, then they can do that on their
> own through the `set:' option. Thanks for the addition! -- Eric
If I understand you correctly, then what we want to expose is the
"timefmt" that is put into the data file and then passed to gnuplot.
The following patch is a complete one against current which adds this
(it works for me, at least), and documents the new +PLOT option
behavior.
The one thing I'm not sure about is my method of passing the timefmt
parameter all the way into the temp file creation function. I made a
buffer-local variable there to do it. That seemed the least intrusive
way to accomplish this, but it seemed like poor practice. Thoughts?
You know, I really ought to allow a person to customize this variable (I
mean, using customize).
------------------------------------------------------------------------
Changes in origin/master
Modified doc/org.texi