Bug 16021 - plot.histogram ignores xaxs and yaxs; it should pass ... when calling plot.window
Summary: plot.histogram ignores xaxs and yaxs; it should pass ... when calling plot.wi...
Status: CLOSED FIXED
Alias: None
Product: R
Classification: Unclassified
Component: Graphics (show other bugs)
Version: R 3.1.0
Hardware: All All
: P5 minor
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2014-10-10 04:23 UTC by Tim Hesterberg
Modified: 2014-10-10 17:13 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Hesterberg 2014-10-10 04:23:10 UTC
hist() calls plot() which calls plot.histogram() which fails to pass ...
when it calls plot.window().
As a result hist() ignores xaxs and yaxs arguments.

par(mfrow = c(1,2))
hist(1:50)
hist(1:50, yaxs = "i") # same

If I copy graphics:::plot.histogram and change the call to plot.window
to add ...,
        plot.window(xlim, ylim, "", ...)
and do:
  environment(plot.histogram) <- asNamespace("graphics")
  assignInNamespace("plot.histogram", plot.histogram, ns = "graphics")
then hist respects the arguments.
Comment 1 Duncan Murdoch 2014-10-10 17:13:27 UTC
I confirm the bug, and will add the fix to R-devel and R-patched.  Thanks!