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

How to change y-axis limits of plot.margins? #187

Open
2 of 3 tasks
mpohlig opened this issue Dec 2, 2022 · 0 comments
Open
2 of 3 tasks

How to change y-axis limits of plot.margins? #187

mpohlig opened this issue Dec 2, 2022 · 0 comments

Comments

@mpohlig
Copy link

mpohlig commented Dec 2, 2022

Please specify whether your issue is about:

  • a possible bug
  • a question about package functionality
  • a suggested code or documentation change, improvement to the code, or feature request

I am trying to change the limits of the y-axis of plot.margins but I cannot find out how. For cplot(), on can simply use the option ylim but that results in an error for plot.margins. How can I change the axis limits of plot.margins, e.g. in order to include zeros for making the graph more intuitively readable?

## load package
library("margins")

## Load data
data(mtacars)

## Run logistic regression
logodd <- glm(vs ~ disp, family = binomial, data = mtcars)

## Plot AME
plot(margins(logodd)) # Works as expected, but y-Axis does not include Zero
plot(margins(logodd), ylim = c(0, -.006)) # Gives error: formal argument "ylim" matched by multiple actual arguments
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

1 participant