Skip to content

add set terminal svg and capture output to svg buffer #20

Open
@mfrasca

Description

@mfrasca

I guess this is the first place where intervention is needed:

I'm holding a spreadsheet in an emacs buffer, not yet decided whether to use ses or org., in both cases I have to go through gnuplot and in particular org-plot makes use of gnuplot-mode.

I'd like to grab the graph in a buffer, in svg format.
the svg format allows me further editing of the graph still using emacs.

my workflows using ses:

  • one ses cell is reserved to a lisp expression evaluating to a string looking like a pair of vectors that I paste in the calculator buffer
  • have the calculator generate the svg code in the *gnuplot trail* buffer
  • collect the svg code in a svg buffer

the workflow using org-plot is more complicated:

  • run org-plot/gnuplot
  • this will generate a file in /tmp and open a window I do not need, so I close it.
  • switch to the *gnuplot* buffer and copy the commands
  • use gnuplot-make-buffer to open a new gnuplot buffer
  • in the new buffer execute set terminal svg
  • then run the commands copied from *gnuplot* buffer
  • collect the svg code in a svg buffer.

I do not see svg in the possible terminals offered by gnuplot-mode.

when terminal is set to svg, I would expect gnuplot-mode to do this:

  • filter the svg output coming from gnuplot and put it in a svg buffer.

first time gnuplot outputs svg code, it will be almost complete (misses the closing svg tag).
subsequent times it starts immediately after the closing defs tag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions