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

axis.line.x and axis.line.y work, but not axis.line #1567

Closed
johnbaums opened this issue Mar 4, 2016 · 5 comments
Closed

axis.line.x and axis.line.y work, but not axis.line #1567

johnbaums opened this issue Mar 4, 2016 · 5 comments
Assignees
Labels
Milestone

Comments

@johnbaums
Copy link

@johnbaums johnbaums commented Mar 4, 2016

In 2.1.0, axis.line.x and axis.line.y work, but axis.line does not.

For example,

This works:

ggplot(mtcars, aes(wt, mpg)) +
  geom_point() +
  theme(axis.line.x=element_line(),
        axis.line.y=element_line())

image

But this doesn't:

ggplot(mtcars, aes(wt, mpg)) +
  geom_point() +
  theme(axis.line=element_line())

image

(The example at http://docs.ggplot2.org/current/theme.html - i.e., m + theme(axis.line = element_line(size = 3, colour = "red", linetype = "dotted")) - also fails)

@amoeba
Copy link

@amoeba amoeba commented Mar 8, 2016

If it helps, I can confirm that I am seeing this behavior as well.

Using ggplot2 * 2.1.0 2016-03-01 CRAN (R 3.2.3) Mac OS 10.11.3. Seems like this could be related to #778.

@nathaneastwood
Copy link

@nathaneastwood nathaneastwood commented Mar 14, 2016

I believe this is also an issue with panel.grid, as this will work for panel.grid.major and panel.grid.minor but not with panel.grid.

@GrosPhoton
Copy link

@GrosPhoton GrosPhoton commented Jul 13, 2016

The same problem seems to happen with line

@Katiedaisey
Copy link
Contributor

@Katiedaisey Katiedaisey commented Jul 20, 2016

@johnbaums @NattyE @GrosPhoton This has been solved in pull request #1581 that has unfortunately not been integrated into the recent ggplot2 update. You can access it there or directly from my branch of ggplot2.

@hadley hadley added this to the v2.2.0 milestone Jul 29, 2016
thomasp85 added a commit that referenced this issue Sep 21, 2016
Fixes #1555, #1557, #1565, and #1567

* Add inherit.blank argument to element constructors

* Look for inherit.blank when combining

* Set inherit.blank = TRUE automatically when theme is complete
@thomasp85
Copy link
Member

@thomasp85 thomasp85 commented Sep 21, 2016

Fixed in #1754

@thomasp85 thomasp85 closed this Sep 21, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants