Skip to content

angle is not applied for the axis titles #1504

Description

@Zaf4

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)

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions