lets-plot
lets-plot copied to clipboard
`coord_fixed`: wrong aspect ratio when using `facet_wrap` with `scales='free'`
Example:
data = {
'x': [0, 0, 2, 0, 0, 8],
'y': [0, 1, 0, 0, 2, 0],
'f': ['a'] * 3 + ['b'] * 3,
}
ggplot(data, aes('x', 'y')) + \
geom_point() + \
coord_fixed(ratio=1) + \
facet_wrap(facets='f', scales='free', nrow=1)
Output, where the grid of coordinates is not a square grid:
Note: If one tries to build a similar example in ggplot2, it gives the error:
`coord_fixed()` doesn't support free scales.