Skip to content

Possible regression: invalid 'layout.pos.row' #132

@lindeloev

Description

@lindeloev

I am using patchwork to arrange bayesplot plots. I'm attaching one such plot, plot1.zip, which is a facet_wrap'ed plot using ncol = 1. Use load("plot1.RData") to load it.

In the "old" patchwork GitHub version (unsure how old, unfortunately, but between two months and a year), this would make two columns as expected:

    plot1 + plot1 

However, with the CRAN version 1.0.0, it yields the following error:

Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
  invalid 'layout.pos.row'

I'm just including one plot here, but the issue exists with different bayesplot plots as well. patchwork 1.0.0 works just fine with "home-made" faceted plots, so it's possible that this is bayesplot not conforming to standards. The grid package seems to be the origin of the layout.pos.row variable.

I don't know if it's of any use, but the following does not raise an error for nrow >= 2. Unfortunately, the resulting plot is "stacked" and the y-axis is inverted:

plot1 + plot1 + plot_layout(ncol = 2, nrow = 7)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions