lets-plot icon indicating copy to clipboard operation
lets-plot copied to clipboard

The tooltip not rotate after we apply coord_flip().

Open hchen98 opened this issue 1 year ago • 1 comments

When I have a horizontal rotation with the plot, I noticed the x and y lab tooltips perfectly rotated as well. However, the tooltip for the plot data is not rotating.

e.g., when I have a vertical plot, the tooltip of the data label works fine: bug_1

but when I apply coord_flip(), the data label is not rotated and becomes hard to read: bug_2

A snapshot of my code:

ggplot(temp_df.melt()) + \
    geom_boxplot(
        aes(x='variable', y='value'),
        outlier_shape=21, outlier_size=2,
        size=1, alpha=.5, width=.5) + \
    labs(x='1', y='Population (millions)') + coord_flip()

Did anyone face the same issue?

hchen98 avatar Aug 03 '22 18:08 hchen98

Hi @hchen98 , rotated labels are certainly a bit harder to read. We'll try to find a better layout option. Thanx for feedback!

alshan avatar Aug 12 '22 17:08 alshan

@hchen98 in v2.5.0 tooltips are only just slightly tilted : image

IMHO it feels better, check this out: https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-22c/tooltips_after_coord_flip.ipynb

alshan avatar Oct 03 '22 20:10 alshan

Hi @alshan, thanks for updating me on this issue!

hchen98 avatar Oct 05 '22 15:10 hchen98