emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Unexpected behaviour with gnuplot source blocks


From: Eric Schulte
Subject: Re: [O] Unexpected behaviour with gnuplot source blocks
Date: Fri, 21 Jun 2013 09:02:28 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Christopher Witte <address@hidden> writes:

> On 20 June 2013 18:12, Eric Schulte <address@hidden> wrote:
>
>> Why not do the following instead which would be equivalent and simpler.
>> The output will be automatically set from the value of your :file header
>> argument.
>>
>> #+begin_src gnuplot :file fig/transInc.eps
>>   reset
>>   set encoding utf8
>>   .....
>> #+end_src
>>
>>
> That kinda works, but I think you still need to set the terminal type
> within the source block.  Using the above the command "set terminal eps"
> gets sent to gnuplot, but you actually need "set terminal postscript eps".
>

I've added a customization variable to ob-gnuplot which may be used to
map file extensions to terminals.  Currently it just holds the mapping
from eps to "postscript eps"

    ;; -*- emacs-lisp -*-
    (defcustom *org-babel-gnuplot-terms*
      '((eps . "postscript eps"))
      "List of file extensions and the associated gnuplot terminal."
      :group 'org-babel
      :type '(repeat (cons (symbol :tag "File extension")
                           (string :tag "Gnuplot terminal"))))

If anyone knows of other good default mapping to add please let me know.

>
> The following works
>
> #+BEGIN_SRC gnuplot :file test.eps
>   reset
      ^
  WRT |, I've also added the *org-babel-gnuplot-prefix* variable, which
may be set to e.g., "reset" to reset the gnuplot process between code
blocks.

Thanks for the feedback.

> 
>   set terminal postscript eps
>   .....
> #+END_SRC
>
> Thanks for the help!
> Chris.

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



reply via email to

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