Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vjust and hjust do not work with axis_text #1230

Open
mark-yong-fs opened this issue Oct 29, 2024 · 1 comment
Open

vjust and hjust do not work with axis_text #1230

mark-yong-fs opened this issue Oct 29, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@mark-yong-fs
Copy link

mark-yong-fs commented Oct 29, 2024

# Test case to demonstrate alignment issue with axis_text_x
# Create a sample DataFrame for testing purposes
data = {
    'category': ['This is a label', 'Label B', 'C', 'D', 'This is a label E'],
    'value': [5, 4, 3, 2, 1]
}
train = pd.DataFrame(data)

# Create bar plot
for i in [0, 0.5, 1]:
    plot = (
        ggplot(train, aes(x='category', y='value'))
        + geom_bar(stat='identity')
        + ggtitle(f'Sample plot: vjust & hjust = {i}')
        + theme(axis_text_x=element_text(angle=45, hjust=i, vjust=i))
    )
    plot.show()

All iterations show up exactly the same
image

@mark-yong-fs
Copy link
Author

Related to #1227

@alshan alshan added this to the 2024Q4 milestone Oct 29, 2024
@alshan alshan added the * label Oct 29, 2024
@MKoroteev-HORIS MKoroteev-HORIS self-assigned this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants