Closed dylanjm closed 4 years ago
I am terribly sorry I haven't noticed your issue report earlier.
The legendbox is by design defaulted to be placed beneath the axis lines, as in most cases this gave the best results as it otherwise would hide some of the axis lines, when positioned in a corner or up against an axis line.
The solution to your issue is setting the z
argument to reposition_legend
to something large enough cover all the other elements in the plot, but nut use Inf
, as this defaults it to be below the axis lines.
Ideally, this parameter should be modified to react differently towards Inf
and another default value. That would however be a breaking change, so it will have to wait until a larger release. Until now, I have modified the help text to better describe how to use it.
Not quite sure how to make a reprex for this problem I'm having and have checked previous issues to see if it's been run into before but I'm attempting to use
reposition_legend()
along withfacet_rep_grid()
.When I do this it appears to be placing the legend behind the grid effect. Is there a way so that the legend will be placed on top? I have tried changing the fill of the legend.box just in case if it was making the box transparent but it does not look to be the case. Here is a pic to show what I mean:
Terribly sorry to not have a reprex to show you but here is my code just incase: