JetBrains / JetBrains/lets-plot

angle is not applied for the axis titles

Open
#1,504 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

related to the #1474

in lets-plot `theme(axis_title_x=element_text(angle=90))` does nothing; angle is fixed to 0.

example, (x-title is expected to be vertical)

```python
from lets_plot import *

LetsPlot.setup_html()

frame = {"x": list(range(1, 11)), "y": [i**2 for i in range(1, 11)]}

(
ggplot(frame, aes("x", "y"))
+ geom_point()
+ ylab("y-title")
+ xlab("x-title")
+ theme(axis_title_x=element_text(angle=90, vjust=0.5))
)
```
Image

I tried in R just to make sure it is the expected behavior. Here is the result, where the title is angled

```R
library(ggplot2)

frame <- data.frame(x = 1:10, y = (1:10)^2)

ggplot(frame, aes(x, y)) +
geom_point() +
ylab("y-title") +
xlab("x-title") +
theme(axis.title.x = element_text(angle = 90,vjust=0.5))
```

Image

Note that I also tried for the y-axis, and the issue persists.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Python example using theme(axis_title_x=element_text(angle=90, vjust=0.5)) and trace how axis title styling is applied for both x and y axes. Compare the rendered result with the R example; done means the configured angle changes the displayed axis titles, including the vertical x-title case.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.