Paul Stansell <paulstans...@gmail.com> writes: > Hi Eric, > > Thanks for your work on this. I've tried your latest changes and I > think they're a big improvement. > > I've attached another org-mode file for you to try. It illustrates > the use of double blank lines in the first table (called block_data) > to inform gnuplot that there're two separate data sets in the single > data file. The first code block (gnuplot_1) plots these two data sets > as red and green surfaces. It's really nice that gnuplot can now be > used in this way from within org-mode. > > One slight drawback, however, is that there still doesn't seem to be a > way to specify missing values in the org table in the way they're > frequently used by gnuplot. An illustration of what I mean by this is > given in the table block_data_missing in the attached org file. > You'll see that I've inserted two '?' characters for missing z-values. > If you execute the second and third code blocks (gnuplot_2 and > gnuplot_3) you'll see that neither give the desired result. >
I see, I've change the `org-babel-gnuplot-quote-tsv-field' function so that it will only wrap a value in double quotes if that value actually needs these wraps (e.g., contains a quote or a space). With this change your example 3 now works as expected (nice looking plots by the way).
#+name: block_data_missing | 1 | 1 | 2 | | 1 | 2 | 5 | | 1 | 3 | 10 | | | | | | 2 | 1 | 5 | | 2 | 2 | 10 | | 2 | 3 | 13 | | | | | | 3 | 1 | 10 | | 3 | 2 | ? | | 3 | 3 | 18 | | | | | | | | | | 1 | 1 | 12 | | 1 | 2 | 15 | | 1 | 3 | 20 | | | | | | 2 | 1 | 15 | | 2 | 2 | 18 | | 2 | 3 | 23 | | | | | | 3 | 1 | ? | | 3 | 2 | 23 | | 3 | 3 | 28 | #+name: gnuplot_3 #+begin_src gnuplot :var d=block_data_missing set ticslevel 0 splot d index 0 u 1:2:3 w lp pt 6 ps 5, d index 1 u 1:2:3 w lp pt 6 ps 5 #+end_src
Are there any use cases which are still not addressed? > > If the block_data_missing table were exported exactly as it is except > for the removal of the '|' characters and "set datafile missing '?'" > were specified in the gnuplot script this would enable gnuplot to plot > the red and green surfaces with the missing values. To see this try > executing the last code block (gnuplot_4) which plots the data which > is first "cleaned" by the shell command you suggested in a previous > post. This would also remove the need to have the :missing header > argument. > > Kind regards, > > Paul > -- Eric Schulte http://cs.unm.edu/~eschulte