Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod2.labels issue #58

Open
marcyshieh opened this issue May 22, 2022 · 1 comment
Open

mod2.labels issue #58

marcyshieh opened this issue May 22, 2022 · 1 comment

Comments

@marcyshieh
Copy link

I am trying to change the "dem_perc" in each of my graph titles into "Dem Pct".

interact_plot(reg2a, pred = x, modx = days, mod2 = dem_perc, data = dataset, x.label = "Regulations", y.label = "Probability of Doing X", legend.main = c("Logged Days"), mod2.labels = c("Dem Pct"))

However, "dem_perc" does not change:

image

What am I doing incorrectly? Any guidance will be appreciated!

@atanasj
Copy link

atanasj commented Aug 4, 2022

@marcyshieh, you need to provide a string for each of the three labels, i.e.,

interact_plot(
  reg2a,
  pred = x, modx = days, mod2 = dem_perc, data = dataset, 
  x.label = "Regulations", y.label = "Probability of Doing X", 
  legend.main = c("Logged Days"), 
  mod2.labels = c("Dem Pct - 1 SD","Dem Pct", "Dem Pct + 1 SD")
)

You also may not need to concatenate the legend.main string, as I think you may only be able to pass a single string to this parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants