ronkeizer / vpc

R library to create visual predictive checks (VPC)
Other
36 stars 20 forks source link

Labels in facet_grid #29

Closed bguiastr closed 7 years ago

bguiastr commented 8 years ago

Great work on the package !

I wanted to generate nice labels for presentation in a VPC using two stratifying variables. To do so I changed the factors of the stratifying variables in the sim and obs datasets. However it seems that the vpc() function automatically appends the variable name to its value eg. VAR=1 and uses character strings rather than factor which messes up the order of the panels.

ggplot2 v.2.1.0 now integrates label_both function which also allows to append the stratifying variable to its value. I would thus recommend to use the labeller function of ggplot rather than manually creating labels.

ronkeizer commented 8 years ago

thanks for letting me know, I'll have a look at the label_both functionality a.s.a.p. Agree it's not optimal a.t.m.

ronkeizer commented 7 years ago

you can now use the ggplot labeler functionality. See in-package help