Open rdstern opened 2 years ago
@rdstern - @Vitalis95 and I looked at this issue together and have fixed it so that if one column is selected, the y-axis is in the correct order. However, if more than one column is selected, then the y-axis is converted to a character variable because there are now factor levels from multiple variables; for example:
Do you have a better idea for a solution when more than one character variable is selected (aside from creating multiple plots and using grid.arrange
)?
The PR is #7831
@lilyclements I can live with that - I suppose - for the example above. But here is your solution for 4 variables without the Flip.
Giving the following:
So, in this dialogue it is only applying the facetting to the y-axis. Not the x. So there is no need to make it into a character here. Let's leave them as factors.
So, when flipping, let's just apply the facetting idea to the x-axis instead?
@rdstern sounds good to me. @N-thony have you assigned this to anyone?
@rdstern sounds good to me. @N-thony have you assigned this to anyone?
@lilyclements yes, this was asssigned to @Vitalis95. @Vitalis95 can you give an update on this?
@N-thony , on this issue , there was already a PR #7831 which @lilyclements closed I will reach out to @lilyclements , the function we had added initially converted the y-axis to a character variable if more than one column is selected, it should be left as factors
@N-thony , on this issue , there was already a PR #7831 which @lilyclements closed I will reach out to @lilyclements , the function we had added initially converted the y-axis to a character variable if more than one column is selected, it should be left as factors
Not sure why I closed this - think it was an accidental closure. It is now reopened
As with the stem plot I suggest this is for @N-thony to allocate.
In this dialogue the default bar chart can be pretty bad. Here it is for the field variable in the survey, made into a factor, and flipped. Note it is in character, rather than the factor (numerical) order. In an ordinary factor like the variety it ignores the order of levels and just uses its own alphabetical.
Here is the code:
I can't see what is wrong, because it is in our own graph_one_variable code.
Once this is corrected, it would be good to check other other options and also see if there can be useful additions to the dialogue. Being able to add labels on the bar charts would be welcome.