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

Maximum possible value for vjust is too small

Open ASmirnov-HORIS opened this issue 5 years ago • 1 comments

The values of vertical text alignment (vjust parameter) are between 0 and 1. But 1 (maximum shift) is sometimes too small to separate points and texts. Look at the example below:

from lets_plot import *
LetsPlot.setup_html()

data = {'x': [0], 'y': [0], 't': ['Point']}

ggplot(data, aes(x='x', y='y')) + \
    geom_point() + geom_text(aes(label='t'), vjust=1)

I think we need either a wider range of admissible values for vjust or a bigger shift corresponding to the value of 1.

ASmirnov-HORIS avatar Jan 27 '21 13:01 ASmirnov-HORIS

We need to support nudge_x, nudge_y parameters (#74). Also 'label.padding' may help. (https://ggplot2.tidyverse.org/reference/geom_text.html).

alshan avatar Jan 27 '21 19:01 alshan