Save a graph as SVG

Does anyone have or know of a tool to save an Igor graph as and SVG file?

Does anyone know if there is a way to extract the graphic vector information off an Igor graph? Say for the purpose of saving an Igor graph as an SVG file. None of the functions seem to be able to do this.

Does anyone know if the contents of the procedure window can be read by a procedure?
Igor can export PDF. There are utilities to convert PDF to SVG; try Googling "Convert PDF to SVG". Not as straightforward as it would be if Igor actually exported SVG, but perhaps you can find something that will work.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Naym wrote:
Does anyone know if the contents of the procedure window can be read by a procedure?


Try the ProcedureText function.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
You _could_ try using the XMLutils file to create an SVG file, but it would be a bit of effort.
On the mac, export your graphics as "Quartz PDF". You can easily open this file with the free, open-source svg editor inkscape (inkscape.org) and save it as a svg. Inkscape inclludes command line utilities, so it may be possible to automate this somewhat, or call inkscape from igor, although I don't know how to do that.
Actually, I was just asking for this some minutes ago in the wish list forum. But now I finally looked at the issue a bit more closely and found that the pdf export together with inkscape works not that bad.
It costs only 1 min and probably 2-4 steps to get a mostly uncluttered svg. That's how I do it (after importing the pdf):
1) most elements in the graph are horribly grouped several times. I just remove all groups by repeatedly hitting ctrl+shift+g.
2) That was my main problem with pdf: All letters in the text have an absolute position saved in the pdf. That is utterly annoying when you want to actually edit the text. But I can easily get rid of this by selecting everything and use 'text' -> 'remove manual kerns'.
3) Every point in the graph is converted to a node. This can be a bit much in huge graphs with thousands of points. When the graph is smooth it may be ok to simplify certain parts.
4) Apply the automatic document constrains under 'document settings' to fit the graph into the frame.

There is no scripting option yet in inkscape itself, but you can run it from the command line. I guess there is a way to automate all this.
chozo wrote:
Actually, I was just asking for this some minutes ago in the wish list forum. But now I finally looked at the issue a bit more closely and found that the pdf export together with inkscape works not that bad.
It costs only 1 min and probably 2-4 steps to get a mostly uncluttered svg. That's how I do it (after importing the pdf):
1) most elements in the graph are horribly grouped several times. I just remove all groups by repeatedly hitting ctrl+shift+g.
2) That was my main problem with pdf: All letters in the text have an absolute position saved in the pdf. That is utterly annoying when you want to actually edit the text. But I can easily get rid of this by selecting everything and use 'text' -> 'remove manual kerns'.
3) Every point in the graph is converted to a node. This can be a bit much in huge graphs with thousands of points. When the graph is smooth it may be ok to simplify certain parts.
4) Apply the automatic document constrains under 'document settings' to fit the graph into the frame.

There is no scripting option yet in inkscape itself, but you can run it from the command line. I guess there is a way to automate all this.


This is very helpful, thanks! I still wish there was a simple "export as SVG" option in the main program though...