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

Axis titles depend on order of datasets #333

Closed
ASmirnov-HORIS opened this issue Feb 20, 2021 · 2 comments
Closed

Axis titles depend on order of datasets #333

ASmirnov-HORIS opened this issue Feb 20, 2021 · 2 comments
Milestone

Comments

@ASmirnov-HORIS
Copy link
Collaborator

Look at the titles for y axis:

from lets_plot import *
LetsPlot.setup_html()

data1 = {'x': [0, 1], 'y': [0, 1]}
data2 = {'s': [1], 'i': [0]}

ggplot() + \
    geom_point(aes(x='x', y='y'), data=data1) + \
    geom_abline(aes(slope='s', intercept='i'), data=data2)

ggplot() + \
    geom_abline(aes(slope='s', intercept='i'), data=data2) + \
    geom_point(aes(x='x', y='y'), data=data1)

It seems that the axis title depends on the order of layers - each with its own data. If we do the same in ggplot2, in both cases axes will be titled "x" and "y".

@alshan alshan added this to the 2.0.1 milestone Feb 21, 2021
@alshan
Copy link
Collaborator

alshan commented Feb 21, 2021

It seems we should derive x/y axis labels from x/y aesthetics only and ignore other positional aesthetics.
If there are nothing to derive from, then just use "x", "y" labels.

See related #334

@OLarionova-HORIS
Copy link
Contributor

PR: #342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants