On Mon, Jun 27, 2016 at 5:42 PM, Greg Snow <538...@gmail.com> wrote:
> You can use the grconvertX and grconvertY functions to find the
> coordinates (in user coordinates to pass to rect) of the figure region
> (or other regions).
>
> Probably something like:
> grconvertX(c(0,1), from='nfc', to='use
You can use the grconvertX and grconvertY functions to find the
coordinates (in user coordinates to pass to rect) of the figure region
(or other regions).
Probably something like:
grconvertX(c(0,1), from='nfc', to='user')
grconvertY(c(0,1), from='nfc', to='user')
On Fri, Jun 24, 2016 at 8:19 P
Try this one:
myBox <- function (which = c("plot", "figure"), ...) {
# draw filled rectangle where box() would draw open rectangle
which <- match.arg(which)
oldXpd <- par("xpd")
on.exit(par(oldXpd))
if (which == "plot") {
do.call("rect", c(as.list(par("usr")[c(1, 3, 2, 4
Hi Jim,
Here is a follow-up question: How would you replicate box("figure")
(instead of box() = box("plot"))?
I tried to fill the plotted box but there seems to be no argument to
box("figure") that does that. If that's indeed the case, one could
work again with rect() (thus replicating box("figure
Hi Jim,
Thanks a lot, exactly what I was looking for.
Cheers,
Marius
On Thu, Jun 23, 2016 at 11:06 PM, Jim Lemon wrote:
> Hi Marius,
> There are a few things that are happening here. First, the plot area
> is not going to be the same as your x and y limits unless you say so:
>
> # run your fi
Hi Marius,
There are a few things that are happening here. First, the plot area
is not going to be the same as your x and y limits unless you say so:
# run your first example
par("usr")
[1] -0.04 1.04 -0.04 1.04
# but
plot(NA, type = "n", ann = FALSE, axes = FALSE,
xlim = 0:1, ylim = 0:1,xaxs=
> On Jun 23, 2016, at 7:29 PM, Marius Hofert wrote:
>
> Hi,
>
> I would like to replicate the behavior of box() with rect() (don't ask why).
> However, my rect()angles are always too small. I looked a bit into the
> internal C_box but
> couldn't figure out how to solve the problem. Below is a m
Hi,
I would like to replicate the behavior of box() with rect() (don't ask why).
However, my rect()angles are always too small. I looked a bit into the
internal C_box but
couldn't figure out how to solve the problem. Below is a minimal
working (and a slightly bigger) example.
Cheers,
Marius
## M
8 matches
Mail list logo