Hi everyone,
I have a follow-up concerning functions available in Veusz...
I need to create a 1D dataset filled with random numbers, however, it appears that
'random' or any other related function does not belong the set of "basic" ones
(like sqrt, etc.) that are supported in dataset creation plug-in.
Is there a workaround to use numpy functions in the plugins?
I could manage to import numpy.random and assign an array from the string list
of values, but this works only until next saving... an example:
# Veusz saved document (version 1.16)
# Saved at 2012-07-20T10:57:46.078000
import random
AddImportPath(u'.')
rs1 = ''
rs2 = ''
for i in range(300):
rs1 = rs1 + str(random.random()) + chr(13) + chr(10)
rs2 = rs2 + str(random.random()) + chr(13) + chr(10)
ImportString(u'`rnd1`(numeric)',rs1)
ImportString(u'`rnd2`(numeric)',rs2)
Set('StyleSheet/Line/width', u'0.25pt')
Set('StyleSheet/Font/size', u'10pt')
Add('page', name='page1', autoadd=False)
To('page1')
Add('graph', name='graph1', autoadd=False)
To('graph1')
Add('axis', name='x', autoadd=False)
Add('axis', name='y', autoadd=False)
To('y')
Set('direction', 'vertical')
To('..')
Add('xy', name='xy1', autoadd=False)
To('xy1')
Set('xData', u'rnd1')
Set('yData', u'rnd2')
Set('markerSize', u'2pt')
Set('PlotLine/hide', True)
Set('MarkerFill/colorMapInvert', True)
To('..')
To('..')
To('..')
Any help will be appreciated!
Best regards,
Sergey
On Fri, 20 Jul 2012 11:20:44 +0200, Paul Cardinaels <[email protected]>
wrote:
Hi all,
I have been using Veusz for some years now and it has always helped me
in producing high quality graphs for my reports.
Now that I have started my graduation project in fluid dynamics I have
come across some problems that depend on the error function:
http://en.wikipedia.org/wiki/Error_function
Is there a quick/easy way to use it in Veusz? I can't seem to find it.
Kind regards,
Paul
--
__________________________________________________
Sergey S. Gromov
Max-Planck-Institute for Chemistry
Atmospheric Chemistry Division
Hahn-Meitner Weg, 1
D-55128 Mainz
E-mail: [email protected]
Web: http://www.mpch-mainz.mpg.de/~gromov
Phone: +49 (6131) 305 4142
_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss