Closed sammo3182 closed 7 years ago
This doesn't seem like a bug to me, Hu. As you point out, all you have to do is use the actual variable names rather than the labels. Do you have a real use case in mind where you couldn't specify the actual variables?
You are right. The vignette example needs to be updated, though. I'll work on that once I get some time.
Hmm--the vignette is working fine for me using the variable labels. In fact, it throws errors if I use the variable names. So back to square one, I guess.
Okay, so the problem is in relabel_y_axis rather than in add_brackets. It seems that the behavior of ggplot2::scale_y_continuous has changed--but only when there's just a single model? Weird. Anyway, I think the solution is to deprecate relabel_y_axis (without fixing it for the single model case) and make relabel_predictors work both before and after dwplot. I'll push that in a couple of minutes.
add_brackets
failed to be functional when using changed var names afterdwplot(...) + relabel_y_axis(...)
. I checkedrelabel_y_axis
andadd_brackets
, and they work well separately. But when using them together causes border issues. I guess it is caused by the recent update of thegrid
package, but I haven't found where exactly the error comes from. @fsolt, could you have a check on the issue when you have time? Or let me know if this is only a problem for PC users.Here's a minimum example of the problem:
You should get the following series of warning when doing the
g2
part and failed to plotg2
: