Insert .xvg graph file (drawn from grace), into LibreOffice writer

Hello,
I have a graph which is in a .xvg/.agr format which is graph drawn from frace. and now i am writing an article so, i want to insert the graph into LibreOffice. how do i do this…??
I tried going to insert option but couldn’t get suitable options to do this.

Any suggestions are appreciated…

You need to change file format before using it on Writer.

It’s almost a decade since I last used (xm)grace so I don’t remember how good (or bad) its SVG support was, but I’m sure you can export into EPS from Grace quite easily. Problem is, of course, LibreOffice do not support EPS so you’ll need an image converter tool. On Linux you can use epstopdf to create a single page PDF and then pdf2svg to convert that PDF into SVG, which is well supported by LibreOffice. The route (after creating an EPS file from grace, of course) would be something like

epstopdf graph.eps --outfile=graph.pdf

and then

pdf2svg graph.pdf useful-graph.svg