Hi Martin,
  Do I understand correctly that you are looking for a way to automate
adding widgets to a plot?

If that's what you want to do, this is where Veusz's Python console
shines. You have a couple of options. You can use the Add() function to
create new widgets, for instance by

>>> To('/page1/plot1') # or whatever widget path you want to add things to
>>> for xds, yds in [('atomic_number' + str(n), 'concentration' +
str(n)) for n in xrange(1, 56)]:
>>>    Add('xy', xData=xds, yData=yds)

or you can use the command line to create new, combined datasets

>>> SetData('atomic_number_combined', [ GetData('atomic_number' +
str(n))[0][0] for n in xrange(1, 56) ])
>>> conc = [ GetData('concentration' + str(n))[0][0] for n in xrange(1,
56) ]
>>> SetData('concentrations_combined', [ c[0][0] for c in conc ],
symerr=[ c[1][0] for c in conc ])

and then create one xy plot manually.

The Veusz manual at http://home.gna.org/veusz/docs/manual.html has a
good description of the general Python API; to see what settings and
subsettings a widget can take, create one of those widgets and look at
the mouse-over tool-tip for each setting to see the setting's Pythonic name.

I hope this helps!

Regards,
Ben

On 9/5/2016 3:14 PM, Martin Valencia wrote:
> Dear Jeremy,
> …dear friends in the Veusz blog,
>
> I am trying to make a X-Y plot for chemical concentrations of rock
> samples. The y axis is the concentration in ppm and the x axis is for
> the chemical elements (55 in total). I am doing the plot adding the
> samples one by one, but the problem is that I have a dataset of more
> than 100 samples. Is there a way to plot all them a at time, instead
> of one by one? I would appreciate much your help…
>
> Thank you.
> Regards,
>    
> /Martín/
> _______________________________________
> /Dr. Martín Valencia Moreno///
> /Investigador Titular A/
> /Estación Regional del Noroeste/
> /Instituto de Geología, UNAM/
> /L.D. Colosio S/N y Madrid, Col. Los Arcos/
> /Hermosillo, Sonora 83240, México/
> /Tel: (662) 217 50 19; Fax: (662) 217 53 40/
> /martin.valen...@unam.mx <mailto:martin.valen...@unam.mx>/
> /http://www.geologia-son.unam.mx//
>
>
>
>
>
> _______________________________________________
> Veusz-discuss mailing list
> Veusz-discuss@gna.org
> https://mail.gna.org/listinfo/veusz-discuss



_______________________________________________
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss

Répondre à