[SOLVED] plotting inertia ellipse only

Here you can report the problems encountered with the graphical functions (db.plot, vario.plot, ...)

[SOLVED] plotting inertia ellipse only

Postby aolinto » Fri Sep 05, 2014 10:52 pm

Dear RGeoS Developers and Users,

I'm trying to draw a plot of the Center of Gravity and the Inertia using SI.cgi function. However I would like to represent in the plot only the inertia ellipse, without the gravity center and the inertia (the cross) as shown in Faraj, A., and Bez, N. 2007. Spatial considerations for the Dakhla stock of Octopus vulgaris: indicators, patterns, and fisheries interactions. ICES Journal of Marine Science, 64: 1820 – 1828, Figure 7.

In the code below when I write "flag.plot=T, flag.ellipse=T" both cross and ellipse are plotted but with "flag.plot=F, flag.ellipse=T" nothing is plotted.

Is there another way to plot the ellipse without the cross? Data I used to draw the plot (fisheries.RData) can be downloaded at https://app.box.com/s/4x3en1xjy5y7y8ghx5sn.

Thanks in advance,

Antonio

Code: Select all
data.db
data.db <- db.locate(data.db,"ARO","z",1) # indicate the variable
data.db

# Compute spatial indices
# Compute and plot the center of gravity, the inertia and the isotropy of the fish densities
x11()
plot(data.db,pch=21,bg.in=0,title="Center of gravity and inertia of densities and samples",inches=5,asp=1)
plot(poly,col=8,add=F)
polygon(costase.p,col=8);box()
res.cgi<-SI.cgi(data.db,flag.plot=T,flag.ellipse=T,col=4) # compute center gravity and inertia
res.cgi

code adapted from
R-script: Indices for capturing spatial patterns of fish population
Author: Mathieu Woillez, Ifremer
aolinto
 
Posts: 2
Joined: Fri Nov 29, 2013 12:33 am

Re: plotting inertia ellipse only

Postby Didier Renard » Mon Oct 06, 2014 8:00 pm

in SI.cgi function, nothing is drawn if flag.plot=FALSE.
When flag.plot=TRUE, the inertia ellipse is only represented when flag.ellipse is TRUE.
Conversely the inertia axes are always represented.

I added an additional flag for the inertia axes.

This will be available in 10.0.5
Didier Renard
 
Posts: 337
Joined: Thu Sep 20, 2012 4:22 pm

Re: [SOLVED] plotting inertia ellipse only

Postby aolinto » Mon Oct 27, 2014 1:54 am

Thanks for your attention Renard.

Best regards,

Antonio Olinto
aolinto
 
Posts: 2
Joined: Fri Nov 29, 2013 12:33 am


Return to Graphical representation

Who is online

Users browsing this forum: No registered users and 1 guest

cron