[Veusz-discuss] exporting data from Veusz
Hello, I've been using Veusz for some time now and I'm thrilled with its capabilities! One particularly useful feature in my opinion is the data set manipulation. However once I've loaded some data and manipulated it the way I want, I haven't been able to figure out how to export the manipulated data sets in a text format. The reason why I would like to do this is because some of the people I'm working with don't use Veusz, so I would like to be able to give them tab delimitted data files containing some of my manipulated data sets so that they can plot them using other plotting programs. Is there such an export feature? If there is, I wasn't able to find it. Thanks a lot in advance, George ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss
Re: [Veusz-discuss] exporting data from Veusz
On Tue, January 10, 2012 11:04, George wrote: I've been using Veusz for some time now and I'm thrilled with its capabilities! One particularly useful feature in my opinion is the data set manipulation. However once I've loaded some data and manipulated it the way I want, I haven't been able to figure out how to export the manipulated data sets in a text format. The reason why I would like to do this is because some of the people I'm working with don't use Veusz, so I would like to be able to give them tab delimitted data files containing some of my manipulated data sets so that they can plot them using other plotting programs. Is there such an export feature? If there is, I wasn't able to find it. Hi George, I don't know of an export _command_, as such, but it should be easy to do from the Veusz python console. Since Veusz is built on top of numeric python (numpy), all of the numpy I/O routines are available. A good reference page for them is http://docs.scipy.org/doc/numpy/reference/routines.io.html As an example, if you want to export the array 'data1' to 'filename.txt', you could run savetxt('filename.txt', GetData('data1')[0]) which would save the values (though _not_ the error bars, unfortunately) to 'filename.txt'. Saving the error bars as well takes just a bit more work, since Veusz stores the data and error bars as separate numpy.ndarrays: # first we combine the data and error bar columns into a single numpy.ndarray: d1 = column_stack([ v for v in GetData('data1') if v is not None]) # then we write it to a file savetxt('filename.txt', d1) I hope this helps! Regards, -- BKS ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss
Re: [Veusz-discuss] psfrag
Thank you for your answer. On Tue, Jan 10, 2012 at 12:18, Jeremy Sanders jer...@jeremysanders.netwrote: On 07/01/12 12:06, Per Nielsen wrote: I recently discovered Veusz and was quite happy as it seemed to solve many of my plotting frustrations. However, then I realized the lack of latex support, which for me is essential. Do you need complete latex support or is it just particular features? Preferably I would like complete latex support. Then I tried using Veusz in conjunction with psfrag to enable latex support, which did not work. After trying psfrag with matplotlib for Python, which to my surprise did not work either, and some googling I found the following post: http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg19767.html Apparently psfrag searches for some specific string format for its latex replacement, which a recent version of matplotlib has changed, breaking psfrag support in matplotlib. Might this issue be the same for Veusz? If so, are there plans to fix it or is there perhaps some workaround? Unfortunately it's Qt which produces the postscript output from drawing commands sent by Veusz. It doesn't seem to put the text strings directly into the postscript output but encodes them. I can't think of an obvious easy fix. What could be done is: 1. Write our own EPS output driver, like I've done for SVG. This would work, but I don't know how to get fonts to embed as postscript fonts. It might be some work too! This is way over my head :) 2. Write SVG output using the current development version and convert to EPS using inkscape. The development version has an option to export text as text in the SVG file (not curves). I think inkscape might be able to write psfrag compatible postscript. I will try this out! 3. Maybe translate what Qt is writing into the EPS file back into text. I tried to look at the EPS file in a text editor, but could not make any sense of it... Jeremy Per ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss