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

Line Plot dialogue is not producing multiple plots for multiple variables #9273

Open
fagiothree opened this issue Nov 24, 2024 · 4 comments · May be fixed by #9276
Open

Line Plot dialogue is not producing multiple plots for multiple variables #9273

fagiothree opened this issue Nov 24, 2024 · 4 comments · May be fixed by #9276
Assignees

Comments

@fagiothree
Copy link
Member

fagiothree commented Nov 24, 2024

Describe the bug
In R-Instat 0.8.0 the Line Plot dialogue is not producing multiple plots for multiple variables, but a single plot

To Reproduce
Steps to reproduce the behaviour (could use any data set). For example

  1. Open the ggplot2 data frame in "economics"
  2. Click on Describe > Graphs > Line Plot..
  3. Select "Multiple variables" and add 2/3 variables to the receiver for y and "year" for x
    image
    the output obtained is the following
    image

Expected behaviour
We should get a line per variable (graph obtained with the same dialogue in R-Instat 0.7.6
image

@N-thony
Copy link
Collaborator

N-thony commented Nov 25, 2024

@fagiothree that is correct, the issue is with code. When you set colour directly in geom_line(), you're specifying a fixed color for all the lines. In the current code, colour="blue" means that all the lines will be blue, regardless of the data. I'm ignoring the reason it has been changed like that. Perhaps @rdstern can explain this or it is just an issue with code that needs to be fixed now.
image

@Vitalis95
Copy link
Contributor

Thanks @fagiothree for pointing this out, we experience the same issue during Uganda workshop and as @N-thony mentioned, the colour is fixed for all the lines. I think we can remove that part to match how it worked in earlier versions.

@fagiothree
Copy link
Member Author

@N-thony @Vitalis95 I think the problem is not just in the colour, but it is considering all the points as part of the same line, see this graph displaying mean(tmax) and mean(tmin) by year for dodoma
image

image

@N-thony
Copy link
Collaborator

N-thony commented Nov 25, 2024

@N-thony @Vitalis95 I think the problem is not just in the colour, but it is considering all the points as part of the same line, see this graph displaying mean(tmax) and mean(tmin) by year for dodoma image

image

@fagiothree this is what I get when I edit the code from the script window by removing colour = "blue" in geom_line
image
image

@Vitalis95 Vitalis95 linked a pull request Nov 25, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants