[SOLVED] Cross-variograms : variables labels on the plots

Here you can report the problems encountered when using a function relative to the variography:
- experimental variography (vario.calc, vario.grid, vmap.calc, ...)
- model fitting (model.auto)

[SOLVED] Cross-variograms : variables labels on the plots

Postby dimitridor » Thu Mar 15, 2018 3:26 pm

Hello,

I computed experimental variograms for several variables with
vario.exp=vario.calc(dat,nlag=nlag, lag=lag, dirvect=dirvect)

Then I fitted a model to them with
vario.model=model.auto(vario.exp, struct=model.type, verbose=verbose, draw=draw, maxiter=10000, pos.legend=5)

I would like the name of the variables to appear on the plots. I've seen in the doc that I should use the option opt.varname=2, e.g. as follows:
vario.exp=vario.calc(dat,nlag=nlag, lag=lag, dirvect=dirvect, opt.varname=2)

I tried to add it to the 2 commands, but it didn't work. Would you please explain me how I should solve this issue?

Many thanks,
Dimitri
dimitridor
 
Posts: 24
Joined: Fri May 26, 2017 10:03 am

Re: Cross-variograms : variables labels on the plots

Postby Didier Renard » Sun Mar 18, 2018 9:16 pm

I tried to mimic the situation with a very small script:

db = db.create(x1=runif(10),x2=runif(10),z1=runif(10),z2=runif(10))
db = db.rename(db,"z1","toto")
db = db.rename(db,"z2","titi")
vario = vario.calc(db)
plot(vario,opt.varname=2)

The resulting figure displays the two simple variograms as wells as the cross-variogram.
On each figure, the name of the variable (as it was in the 'db' when the calculation took place) is displayed.

Of course (as the argument is passed using the '...' mechanism, this remains true in functions calling the procedure
for displaying variograms. For example:

model.auto(vario,opt.varname=2)

Hope this helps.
Didier Renard
 
Posts: 270
Joined: Thu Sep 20, 2012 4:22 pm

Re: Cross-variograms : variables labels on the plots

Postby dimitridor » Mon Mar 19, 2018 3:07 pm

Thank you for the explanations.

After some additional tests, it seems that there is a conflict with the pos.legend option. Following your example, this is crashing:

model.auto(vario, pos.legend=5, opt.varname=2)

with error message:

Error in legend(...) : unused argument (opt.varname = 2)

while

model.auto(vario,opt.varname=2)

works fine.

Can you tell me if there is a solution for that ? I would like to use the dirvect option of vario.calc and thus display the resulting directional variograms. The legend is thus welcome.

Thank you for your help.
dimitridor
 
Posts: 24
Joined: Fri May 26, 2017 10:03 am

Re: [SOLVED] Cross-variograms : variables labels on the plot

Postby Didier Renard » Mon Mar 19, 2018 3:16 pm

Hi Dimitri
The options pos.legend and opt.varname were incompatible. I just corrected this bug.
It will be OK in the next version.
(PS: I changed the subject to SOLVED: if not convinced, please change it back)
Didier Renard
 
Posts: 270
Joined: Thu Sep 20, 2012 4:22 pm

Re: [SOLVED] Cross-variograms : variables labels on the plot

Postby dimitridor » Mon Mar 19, 2018 3:32 pm

Thanks a lot for your reactivity, Didier.

When will this next release be available?
dimitridor
 
Posts: 24
Joined: Fri May 26, 2017 10:03 am

Re: [SOLVED] Cross-variograms : variables labels on the plot

Postby Didier Renard » Tue Mar 20, 2018 12:03 pm

In few days certainly ... as soon as we have solved our computer problems with new migration to Ubuntu
Didier Renard
 
Posts: 270
Joined: Thu Sep 20, 2012 4:22 pm

Re: [SOLVED] Cross-variograms : variables labels on the plot

Postby dimitridor » Mon Apr 16, 2018 1:39 pm

Hello Didier,

Did you solve your migration problems? I need the correction to include figures in a report. I would be very happy if I could include the variogram figures with their nice labels.

Best regards,

Dimitri
dimitridor
 
Posts: 24
Joined: Fri May 26, 2017 10:03 am

Re: [SOLVED] Cross-variograms : variables labels on the plot

Postby Fabien Ors » Fri Apr 27, 2018 12:58 pm

Dear Dimitri,
The last RGeostats release has just been published.
Does it solved your problem ?
Best regards,
Fabien
Fabien Ors
Administrateur du site
 
Posts: 136
Joined: Thu Sep 20, 2012 1:07 pm


Return to Variography

Who is online

Users browsing this forum: No registered users and 0 guests

cron