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

Compatibility of legends in make_frame #11

Closed
Yuming-Zhang opened this issue Sep 25, 2017 · 1 comment
Closed

Compatibility of legends in make_frame #11

Yuming-Zhang opened this issue Sep 25, 2017 · 1 comment
Assignees

Comments

@Yuming-Zhang
Copy link

Hi,

I think make_frame works very well when we add plots on it. The only issue I find out for this moment is that, make_frame seems to have some issue with the location of legend of the original plot.

For example, please try the below code:
Xt = gen_gts(300, AR(phi = c(0, 0, 0.8), sigma2 = 1))
model = arima(Xt, order = c(3,0,0), include.mean = T)
resid_plot(Xt, model, std = FALSE, type = "hist")

As you can see the plot will have legend in the very topright, which should be included inside the white space.

@munsheet Do you think we can modify the make_frame function a bit to have it compatible with legends? Please let me know if I can help in any way! Thanks a lot! :)

@munsheet
Copy link
Member

munsheet commented Feb 17, 2018

custom_legend() should work the same as legend()

Try running the above lines again.

Xt = gen_gts(300, AR(phi = c(0, 0, 0.8), sigma2 = 1))
model = arima(Xt, order = c(3,0,0), include.mean = T)
resid_plot(Xt, model, std = FALSE, type = "hist")

I replaced all legend() with custom_legend() in simts for now.

Note that any time you want to add a legend with a make_frame() plot, you also need to use custom_legend()

Please close this issue if this issue seems to be fixed.

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