----- Original Message ----- From: "Kornel Benko" Sent: Monday, June 09, 2014 8:40 AM
Am Montag, 9. Juni 2014 um 08:07:16, schrieb Alex Vergara Gil <a...@cphr.edu.cu> > Dear Lyxers! > > Studying a little of python and LyX I have reached to this feature that makes > LyX show and process python graphics. Thanks to Rainer M Krug for the hints. > I share this contribution for LyX under LGPL license, so everyone benefits > from it. Good luck and happy lyxing! > > Alex Vergara Gil > MSc Nuclear Physics > SSDL, CPHR, Havana Cuba > > PS: If Rainer agree, pass him from acknowledgements to author list, please. Trying # python example.pygr x.eps I saw, I had to install matplotlib and pandas. Thats OK, this example shows now in lyx too. Fortunately it was included in debian package manager. Indeed, to obtain python graphics matplotlib is required, pandas is a robust library to handle with complex data. Both are in any package manager. The fact that this displays in lyx too is a very nice extra. My first intention was to have a module that insert python code and executes it, but this way is far simpler and reaches the same objective. But the try # python example2.pygr x.eps leads to ImportError: No module named seaborn After installing also python-pip and using # sudo pip install seaborn I got the expected output. This should be documented somewhere I think. Nice work. Kornel In this case my intention was to show that any other python library can be used as well, and it is expected a little knowledge of python from the user, since it is the user itself who will build its own graphic script. But your hint is valid, it should be documented how to obtain extra python packages too. Regards Alex