Re: [Veusz-discuss] adding ellipses to plots

2016-06-15 Par sujet Jeremy Sanders

Dear Johan

On 06/15/2016 11:02 AM, Johan Asplund wrote:

I’m trying to add ellipses to a veusz figure like the one in the
attached “plot.png”. The ellipses in plot.png was created using
ordielllipse from the R package vegan.


The existing ellipse widget can do something like this. The main problem 
is getting your data into the right form. The ellipse centres can be 
specified in axes coordinates, but unfortunately the width and height 
and have to be in fractions of the plot width. The angle is in degrees. 
This is a pain to compute from your covariance matrix.


However, I think it'd be a good idea to have a direct way of plotting 
ellipses based on covariance matrices. I was thinking of doing something 
similar for my own work. I assume it's mostly a matter of computing the 
eigenvectors and plotting an ellipse/diamond/box aligned along these 
vectors.


I'll have a think about this. Maybe separate datasets for the items in 
covariance matrix, or using the datasets themselves plus the 
non-diagnonal entry.


Cheers

Jeremy


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


[Veusz-discuss] adding ellipses to plots

2016-06-15 Par sujet Johan Asplund
I'm trying to add ellipses to a veusz figure like the one in the attached
"plot.png". The ellipses in plot.png was created using ordielllipse from the
R package vegan. 

 

However, I would really like to make these in veusz because I want to other
stuff with the plot as well and combine different plots. Veusz would give me
much better results than a R/inkscape combination.

 

For each ellipse R gives me the information pasted below. n.obs and are just
the number of observations and wt is simply 1/n.obs. Scale is the same for
each ellipse

 

Example for one of the ellipses

$FagusFagus

$FagusFagus$cov

 NMDS1NMDS2

NMDS1  0.004170987 -0.001147046

NMDS2 -0.001147046  0.008205679

 

$FagusFagus$center

  NMDS1   NMDS2 

-0.29480919 -0.05104379 

 

$FagusFagus$n.obs

[1] 9

 

$FagusFagus$wt

[1] 0.111 0.111 0.111 0.111 0.111 0.111 0.111
0.111 0.111

 

$FagusFagus$scale

[1] 2.447747

 

Johan



figure.vsz
Description: Binary data
___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss