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

Répondre à