From: "Richard Heck" <rgh...@lyx.org> Sent: Thursday, May 29, 2014 5:05 PM >> I might be *completely* off, but couldn't you achieve exactly this via >> defining converters? I have for example a converter defined, which >> "converts" plantuml source fields into uml graphs, i.e. it defines the >> call to compile them and return the graphs which are then inserted in >> the document? > > Yes, that's more or less what I was suggesting. > > rh >
Let's see if I understand: 1. I wrote a python script that produces the graphic I want 2. I insert it in LyX somehow I don't know, perhaps defining a converter from .py to svg, but this needs to be inside a module or every python script in LyX will try to be converted into a svg!! So a module is also needed 3. LyX is the one who knows the correct size of the graphic so in principle if I produce a svg should be enough but in this way I need to produce a new svg every time the data change Take this simple script as example import numpy as np from numpy.random import randn import matplotlib as mpl import matplotlib.pyplot as plt np.random.seed(9221999) data = randn(75) plt.hist(data) which produce a graphic like this in spyder So basically I save this graphic to a svg and then I load it into LyX, but why not letting LyX doing this automatically if it already handles with python?? This is my question. Regards Alex