shinystan icon indicating copy to clipboard operation
shinystan copied to clipboard

Latex for graphs like stan_ac, stan_dens, and others

Open UglyDogIsDog opened this issue 4 years ago • 3 comments

I wonder if there is a way to transform the parameter names to its greek letter form

UglyDogIsDog avatar Oct 27 '21 05:10 UglyDogIsDog

Hey I'm not sure which version you are using. If you use the version 3.0 you could download the rds files associated with the figures. These are ggplot objects so you could manipulate them. e.g. for the divergentScatterPlot you can download the .rds file and load it in and change the axis;

p1 <- readRDS("divergentScatterPlot.rds") p1 + xlab(expression(mu))

image

Best, Duco

VeenDuco avatar Oct 27 '21 12:10 VeenDuco

I use something like

fit_tmp <- fit() names(fit_tmp) <- paste("$\", names(fit_tmp), "$", sep="") stan_dens(fit_tmp, row_tmp) + theme(axis.text.x = element_text(size = 15), axis.text.y = element_text(size = 15))

There are some subgraphs with parameter names such as 'beta[1,1]', 'beta[1,2]'. But they do not automatically render to their greek forms. Do you have some solutions to generate the parameter names in latex?

UglyDogIsDog avatar Oct 27 '21 14:10 UglyDogIsDog

The expression() function works to get the greek symbols. See here for example. Hope this helps, Best, Duco

VeenDuco avatar Oct 30 '21 12:10 VeenDuco