crp2a / BayLum

Chronological Bayesian models integrated for Optically Stimulated Luminescence (OSL) Dating
https://crp2a.github.io/BayLum/
GNU General Public License v3.0
9 stars 1 forks source link

Labels for figures produced by MCMC_plot #5

Closed guiguerin closed 6 years ago

guiguerin commented 6 years ago

Expected behaviour

There should be proper titles for the axes of the figures produced by the function MCMC_plot (or one Age computation function, which calls MCMC_plot). For the chains (left panel), xlab = iteration, ylab = Age (ka) for the top row, D (Gy) for the middle row, sD (Gy) for the bottom row.

Observed behaviour

When running the function MCMC_plot or one Age computation function, several problems appear in the figures showing the MCMC (unnecessary titles appear, but no axis title appears).

Running mini example

library(BayLum)
load(DATA3)
priorage <- c(10,60) 
Age <- Age_Computation(
  DATA = DATA3,
  SampleName = "FER1",
  PriorAge = priorage,
  Iter = 100,
  quiet = FALSE)
guiguerin commented 6 years ago

On top of this problem, the axis range for each MCMC plot and each posterior density plot is set based on the range of values for the first chain. When the other two chains diverge from the first, the corresponding values are out of range and thus don't appear on the graph!

A solution to this problem could be offered by the function matplot.

RLumSK commented 6 years ago

This takes a little bit more time. I discovered some odd things which have to be fixed first, otherwise the plotting cannot be tweaked as requested:

Suggestion:

The function should be replaced by a modification using the coda plot functions.

RLumSK commented 6 years ago

I replaced the function with a new one, there was no other way. Should work now, please check

RLumSK commented 6 years ago

Ok, I guess this is ok now.