Hi Gavin
On 15/02/12 08:17, Junkshops wrote:
> Utter Veusz newbie here, I'm afraid. I have a similar problem to a
> recent mail (without a solution, I'm afraid) I found in the archives - I
> need to plot 3 sets of several hundred lines each (for the curious, the
> data is 2 wavelengths of fluorescence intensity, tracing lineages, from
> a single engineered bacteria growing to >500 cells in a monolayer as
> well as another dataset of bacterial morphology by lineage) on the same
> plot (2 axes).
Do you want to plot hundreds of thousands of individual lines? I suspect
the program might go too slowly with that many xy widgets, but you could
try. A better solution might be to put all your x and y data into two x
and y datasets, separating each line with nan values. nan values will
break the plotting line. Unfortunately the join dataset dataset plugin
doesn't have an option to add nan values between each joined dataset for
you, but I should add that.
Alternatively, there's the line widget, which draws individual lines
given x and y starting points and lengths.
> Obviously, manually adding an xy widget for each one is
> unthinkable, so I need some automated way to to this. I presume I could,
> in the console, use GetDatasets() to get the dataset names, loop over
> each dataset with a python loop, and create an xy widget with Add(), but
> I don't see how to associate the dataset with the xy widget. E.g:
>
>>>> for ds in GetDatasets():
>
> ... Add("xy", ds) //this doesn't work - the widgets are still named xyXXX
You need something like:
Add("xy", name="myname1", xData="myxdata1", yData="myydata1")
The name="XX" is the optional name. You can pass settings in the add
command so the above command is equivalent to
Add("xy", name="myname1")
Set("myname1/xData", "myxdata1")
Set("myname1/yData", "myydata1")
> If anyone could tell me what the command is to insert data into a widget
> I'd appreciate it - or if there's some way of figuring it, and future
> similar issues, out myself so much the better. If it's in the manual I'm
> just stupid and would appreciate a pointer.
See above. An easy way is to make a basic plot doing what you want and
save the vsz file. The commands you need are in there, but you can use
python to automate looping.
I don't know how you have your data, but you can automate setting
datasets with values using
SetData("myxdata1", vals)
where vals is a python list or a numpy array.
Thanks
Jeremy
_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss