IDEMSInternational / R-Instat

A statistics software package powered by R
http://r-instat.org/
GNU General Public License v3.0
38 stars 103 forks source link

geom boxplot doesn't require x aes! #4807

Open dannyparsons opened 6 years ago

dannyparsons commented 6 years ago

A very minor changed in ggplot2 v3.0.0 is that this now works: ggplot(mtcars, aes(y = disp)) + geom_boxplot() So x isn't required. This could simplify some of our code, although I don't like that the graph shows a scale for the x axis which is confusing as it doesn't really have any meaning: image Compared to ggplot(mtcars, aes(x = "", y = disp)) + geom_boxplot() which is simpler. image

I'm not sure we need to change anything but it's good to know x is now optional. This is much better for teaching ggplot2 as it wasn't obvious to explain why x is needed for boxplots.

maxwellfundi commented 6 years ago

i agree this looks simpler. Possibly there could be a way to get rid of the scales when we have no x

dannyparsons commented 6 years ago

I've asked about this on the original ggplot2 issue so will see what the response is to that.

maxwellfundi commented 6 years ago

Great! Regards Maxwell Fundi || Phone :+254728508241||

On Mon, Jul 23, 2018 at 3:20 PM Danny Parsons notifications@github.com wrote:

I've asked about this on the original ggplot2 issue so will see what the response is to that.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/africanmathsinitiative/R-Instat/issues/4807#issuecomment-407038765, or mute the thread https://github.com/notifications/unsubscribe-auth/AJWEIQIHvsFQDC1W2ECnV4rgKdKZ0Mqeks5uJb90gaJpZM4Va3f8 .

Ogik99 commented 5 years ago

@maxwellfundi, @dannyparsons any updates on this

dannyparsons commented 5 years ago

The issue on ggplot2's repo was closed so I'm not sure if anything was done. Someone could check with the latest version of ggplot2 what happens with ggplot(mtcars, aes(y = disp)) + geom_boxplot() now.

Ogik99 commented 5 years ago

The scale on the x axis still exists @dannyparsons

dannyparsons commented 5 years ago

Ok thanks, I think we then leave as we have it until it improves by having the x scales removed.