JetBrains / JetBrains/lets-plot

`coord_fixed`: wrong aspect ratio when using `facet_wrap` with `scales='free'`

Open
#1,299 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
1.8k
Forks
60
PR merge metrics
No merged PRs in 30d

Description

Example:

```python
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:

![Image](https://github.com/user-attachments/assets/9a142442-eb3d-4090-a4d4-50c5eea669a4)

**Note:** If one tries to build a similar example in ggplot2, it gives the error:
```
`coord_fixed()` doesn't support free scales.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.