JetBrains / JetBrains/lets-plot

text axis labels dropped unexpectedly

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

Description

When I make a plot with text labels on one axis, I expect to see every single label. If we're plotting categorical values we need to know every value. Lets plot is silently dropping them so that labels don't overlap. I've made plots that didn't make any sense because of this missed expectation. I don't think there's a case for dropping these labels, just like we would not want to silently drop categorical labels in a legend because they overlap.

```
import numpy as np
import polars as pl
from lets_plot import *
LetsPlot.setup_html()

df = pl.DataFrame({
"x": np.random.randn(100),
"y": [f"label_{i}" for i in range(100)],
})
(
ggplot(df, aes(x='x',y='y'))
+ geom_point()
)
```

Image

For reference seaborn doesn't drop labels and has them overlap.
```
import seaborn as sns
import matplotlib.pyplot as plt

sns.scatterplot(data=df, x="x", y="y")
plt.show()
```

Image

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.