Re: [Veusz-discuss] Embedded BoxPlot
Hi Jeremy, thank you for your quick answer. Assigning variable names as string(s) was the missing hint. By looking through the produced vsz-files it's easy to find necessary keywords. Now I understand how to use the veusz library in python. Work goes on :) Many thanks!! Dennis -Ursprüngliche Nachricht- Von: Jeremy Sanders [mailto:jer...@jeremysanders.net] Gesendet: Mittwoch, 15. Juli 2015 22:04 An: Zink, Dennis z...@ifb.uni-stuttgart.de; veusz-discuss@gna.org Betreff: Re: [Veusz-discuss] Embedded BoxPlot Hi Dennis On 07/15/2015 01:53 PM, Zink, Dennis wrote: your tool seems to be perfect for my issues . Thank you for that. For evaluating many results I’m trying to create boxplots automatically. First I don’t need an embedded Box. The vsz-File is important for me. Is it possible to build a vsz-File in Python without showing the graph window? Yes, you can use Embedded(Name, hidden=True) to hide the window. I tried to write a short test script (see below). But I can’t get a proper output. For the version below I get the ValueError: API 'QDate' has already been set to version 1 What type of system are you running on? I don't get that message (which is a bit worrying), but got Traceback (most recent call last): File test.py, line 41, in module BoxPlot_1.values.val=[y_test[1],y_test[2]] File /home/jss/code/veusz/veusz/embed.py, line 476, in _setVal self._ci.Set(self._path, val) File /home/jss/code/veusz/veusz/embed.py, line 316, in runCommand return self.sendCommand( (self.winno, cmd, args[1:], args2) ) File /home/jss/code/veusz/veusz/embed.py, line 309, in sendCommand raise retobj veusz.utils.utilfuncs.InvalidType I think you may need a str() around the list, as this setting has a text type. It runs to the end with this change. The best way to learn the various settings for Veusz is to make plots in the GUI and look at the produced vsz files. I was working on an proper API documentation generator, but this is at the bottom of my priority list at the moment. The Veusz source code documents the settings as well, see e.g. https://github.com/jeremysanders/veusz/blob/master/veusz/widgets/boxplot.py (look for addSettings). Hope this helps Jeremy ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss
[Veusz-discuss] Embedded BoxPlot
Hi, your tool seems to be perfect for my issues . Thank you for that. For evaluating many results I'm trying to create boxplots automatically. First I don't need an embedded Box. The vsz-File is important for me. Is it possible to build a vsz-File in Python without showing the graph window? I tried to write a short test script (see below). But I can't get a proper output. For the version below I get the ValueError: API 'QDate' has already been set to version 1 import numpy import sys from collections import defaultdict import veusz.embed as veusz x_test=[1.,1.,1.,1.,1.,5.,5.,5.,5.,5.] y_test=defaultdict(list) z=0 for x in x_test: z=z+x y_test[x].append(z**2) Fenster=veusz.Embedded(Auswertung) Fenster.SetData('x2', x_test) Fenster.SetData('y2', y_test[1]) Seite_1=Fenster.Root.Add('page',name=Seite_1, autoadd=True) Graph_1=Seite_1.Add('graph', name=Graph_1, autoadd=True) BoxPlot_1=Graph_1.Add('boxplot', name=BoxPlot_1, autoadd=True) BoxPlot_1.values.val=[y_test[1],y_test[2]] BoxPlot_1.posn.val=x_test Fenster.Save(r...\Auto_test.vsz) Maybe you can show me how to 'teach' the boxblot widget. Is there an easy way to find the right keywords (e.g. 'posn') for different widgets? (Don't be scared of German descriptions :) ) Thank you for your help. Greetings Dennis ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss
Re: [Veusz-discuss] Embedded BoxPlot
Hi Dennis On 07/15/2015 01:53 PM, Zink, Dennis wrote: your tool seems to be perfect for my issues . Thank you for that. For evaluating many results I’m trying to create boxplots automatically. First I don’t need an embedded Box. The vsz-File is important for me. Is it possible to build a vsz-File in Python without showing the graph window? Yes, you can use Embedded(Name, hidden=True) to hide the window. I tried to write a short test script (see below). But I can’t get a proper output. For the version below I get the ValueError: API 'QDate' has already been set to version 1 What type of system are you running on? I don't get that message (which is a bit worrying), but got Traceback (most recent call last): File test.py, line 41, in module BoxPlot_1.values.val=[y_test[1],y_test[2]] File /home/jss/code/veusz/veusz/embed.py, line 476, in _setVal self._ci.Set(self._path, val) File /home/jss/code/veusz/veusz/embed.py, line 316, in runCommand return self.sendCommand( (self.winno, cmd, args[1:], args2) ) File /home/jss/code/veusz/veusz/embed.py, line 309, in sendCommand raise retobj veusz.utils.utilfuncs.InvalidType I think you may need a str() around the list, as this setting has a text type. It runs to the end with this change. The best way to learn the various settings for Veusz is to make plots in the GUI and look at the produced vsz files. I was working on an proper API documentation generator, but this is at the bottom of my priority list at the moment. The Veusz source code documents the settings as well, see e.g. https://github.com/jeremysanders/veusz/blob/master/veusz/widgets/boxplot.py (look for addSettings). Hope this helps Jeremy ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss